Mathematics, Fourier Transform, Image Processing, Numpy.
x2, y2 = x1+height, y1+width # synthetic displacement dist_x, dist_y = 90, 110 def add_noise(img): # add gaussian noise gauss = np.random.normal(0, 10, img.shape) return img + gauss.reshape(img.shape) before_shift = add_noise(img[x1:x2, y1:y2, -1]) after_shift = add_noise(img[x1+dist_x:x2+dist_x,