Remap a single point unsing maps from initUndistortRectifyMap().

asked 2018-01-22 10:43:33 -0500

Soarez gravatar image

updated 2018-01-22 10:45:06 -0500

Hi, im tring to remap a set of points. Im using fisheye lens and calibrating the camera with opencv fisheye model, and it goes very nice. at the end of the calibration i do fisheye::initUndistortRectifyMap(), to get the map1 and map2. After this is test correction of the image with remap(distorted_img, undist_img, map1, map2, linear); and it works fine. Yet when im tring to remap a single point using :<float>(distorted[i].y,distorted[i].x);<float>(distorted[i].y,distorted[i].x);

i dont get the same as the remap function.

[For initUndistortRectifyMap] im using now CV_32FC1 and i get 2 maps with x, y coordinates, but when i use CV_16UC2 i get map1 with x,y info equal to the 2 maps from 32FC1 type and i dont understand the output on map2 (from CV_16UC2 ).

i give you some images to help.

image description

original image | undistorted image (using remap) and works with both types (CV_32FC1 CV_16UC2)

edit retag flag offensive close merge delete


I am having similar issues, my guess is that the maps generated with initUndistortRectifyMap() are only used for inverse mapping. Did you make any progress or could you solve this issue by now?

cmdkeen gravatar imagecmdkeen ( 2018-03-14 09:57:39 -0500 )edit