Is there exist a function to "undistort" list of points instead of 2d array (image)?


Based on documentation of camera calibration one can assume that to get an undistorted image one need to apply the following operations:

  1. Get images with chess board, then use cv.calibrateCamera() which returns the camera matrix, distortion coefficients, rotation and translation vectors etc.
  2. Based on above: compute the undistortion and rectification transformation map ( cv.initUndistortRectifyMap()).
  3. Applies a generic geometrical transformation to an image ( cv.remap()).

As a result, one can get an undistorted image. The downside of undistort operation is data loss during remap process - some pixels need to be interpolated.
In my case, I need only a specific part of an image (e.g. list of points that represents edge). Is there exist a way to use maps obtained during camera calibration on a list of points instead of a 2D array (image)?

you probably didnt imagine there is undistortPoints() ?

To be honest, I did, but I didn’t know where to look for it. Thank you!