In [3]:
%load_ext autoreload
%autoreload 2
import matplotlib.pyplot as plt
# %matplotlib inline
from skimage import data, viewer, transform
import random
In [12]:
stack = []
im = data.camera()
for i in range(0, 60):
# Generate a random shift
d = 15
shift = (random.randint(-d, d), random.randint(-d, d))
matrix = transform.SimilarityTransform(translation=shift)
new_im = transform.warp(im, matrix, mode='symmetric')
stack.append(new_im)
In [9]:
Out[9]:
In [ ]: