I have a "distort.png" image in which the "R,G" Channels holding motion vectors (Original Position offsetted by 10 pixels) I'm using remap to transform the image into the new location with the following snippet but I get a weirdly squeezed image instead a translated one. Any thoughts?
import cv2
distort = cv2.imread(r"D:\distort.png").astype(np.float32)
src = cv2.imread(r"D:\taj.png")
map_x = distort[:, :, 1].copy()
map_y = distort[:, :, 2].copy()
remapped_image = cv2.remap(src, map_x, map_y, interpolation=cv2.INTER_LINEAR)
cv2.imshow('Original Image', remapped_image)
cv2.waitKey(0)
cv2.destroyAllWindows()
However the image seems to be distorted:
and supposed to look like this (translated by 10pixels in x and y):
Here is the source image "taj.png"
And the source distort (motion vector) file



