OpenCV remap interpolation error?
问题 I'm using opencv remap function to map an image to another coordinate system. However, my initial tests indicate that there are some issues with the interpolation. Here, I give a simple example of a constant 0.1 pixel shift for a image that is 0 everywhere but at position [50,50]. import cv2 import numpy as np prvs = np.zeros((100,80), dtype=np.float32) prvs[50:51, 50:51] = 1. grid_x, grid_y = np.meshgrid(np.arange(prvs.shape[1]), np.arange(prvs.shape[0])) grid_y = grid_y.astype(np.float32)