def remap(im, coords):
if cv2:<EOL><INDENT>return remapOpenCv(im, coords)<EOL><DEDENT>else:<EOL><INDENT>return remapScipy(im, coords)<EOL><DEDENT>
Remap an RGB image using the given target coordinate array.

If available, OpenCV is used (faster), otherwise SciPy.

:type im: ndarray of shape (h,w,3)
:param im: RGB image to be remapped
:type coords: ndarray of shape (h,w,2)
:param coords: target coordinates in x,y order for each pixel
:return: remapped RGB image
:rtype: ndarray of shape (h,w,3)