util module

lensfunpy.util.remap(im, coords)

Remap an RGB image using the given target coordinate array.

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

Parameters:
  • im (ndarray of shape (h,w,3)) – RGB image to be remapped

  • coords (ndarray of shape (h,w,2)) – target coordinates in x,y order for each pixel

Returns:

remapped RGB image

Return type:

ndarray of shape (h,w,3)

lensfunpy.util.remapOpenCv(im, coords)

Remap an image using OpenCV. See remap() for parameters.

lensfunpy.util.remapScipy(im, coords)

Remap an image using SciPy. See remap() for parameters.