ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi Charles,

Your question doesn't have much to do with ROS, maybe you should ask it on an OpenCV forum, but as long as you made the effort to post it so nicely let my try to answer it.

As far as I know undistortPoints do not rectify the points. The correct approach would be to call initUndistortRectifyMap and then use Remap.

If instead of remapping the whole image what you need is to undistort and rectify only some image points, then what you can do is use manually the maps (mapx and mapy) generated by initUndistortRectifyMap. Something like this (assuming that point1 is a point on the original image):

undistortedRectifiedPoint.x = mapx[point1.x, point1.y]
undistortedRectifiedPoint.y = mapy[point1.x, point1.y]

I hope this helps.

Best regards, Martin.