Ask Your Question
0

How to get undistorded point

asked 2019-05-24 06:43:40 -0600

dev4all12358 gravatar image

Hello,

I use that line to get undistor fisheye images:

  cv::fisheye::estimateNewCameraMatrixForUndistortRectify(
      camera_matrix, distortion_coefficients, image.size(),
      cv::Mat::eye(3, 3, CV_32F), new_camera_matrix,
      static_cast<double>(balance), image.size(),
      static_cast<double>(distance));
  cv::fisheye::initUndistortRectifyMap(
      camera_matrix, distortion_coefficients, new_camera_matrix,
      R, image.size(), CV_32F, map1, map2);

So I have my distorded image and my undistorded image. For one coordinate on the distorded image I want to get the coordinate in the undistorded image.

How can I get that coordinate? Is there a function in opencv to do that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-05-27 17:44:38 -0600

Tetragramm gravatar image
edit flag offensive delete link more

Comments

I try to get undistort points with this function but the result doesn't fit.

Here is my input points :[ [261 437] [402 463]] and I should get [[141 473][375 485]] according to the remap image result. But I get : undistorded_point[250.2253, 440.69083; 398.36475, 465.32333]

dev4all12358 gravatar imagedev4all12358 ( 2019-06-18 02:34:48 -0600 )edit

Perhaps you could share the code you used to call undistortPoints? I can't possibly tell if you're using it correctly. You can edit your main post.

Tetragramm gravatar imageTetragramm ( 2019-06-21 18:26:49 -0600 )edit

I found my error I use cv::undistortPoints and I should use cv::fisheye::undistortPoints. Now I get the good result.

dev4all12358 gravatar imagedev4all12358 ( 2019-07-04 11:10:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-24 06:43:40 -0600

Seen: 249 times

Last updated: May 27 '19