Inverting a real-valued index grid
问题 OpenCV's remap() uses a real-valued index grid to sample a grid of values from an image using bilinear interpolation, and returns the grid of samples as a new image. To be precise, let: A = an image X = a grid of real-valued X coords into the image. Y = a grid of real-valued Y coords into the image. B = remap(A, X, Y) Then for all pixel coordinates i, j, B[i, j] = A(X[i, j], Y[i, j]) Where the round-braces notation A(x, y) denotes using bilinear interpolation to solve for the pixel value of