Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Remap a single point unsing maps from initUndistortRectifyMap().

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 :

   y=map2.at<float>(distorted[i].y,distorted[i].x);     
   x=map1.at<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)

Remap a single point unsing maps from initUndistortRectifyMap().

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 :

   y=map2.at<float>(distorted[i].y,distorted[i].x);     
   x=map1.at<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)

Remap a single point unsing maps from initUndistortRectifyMap().

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 :

   y=map2.at<float>(distorted[i].y,distorted[i].x);     
   x=map1.at<float>(distorted[i].y,distorted[i].x);

i dont get the same as the remap function. [for

[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)