Ask Your Question

kam3k's profile - activity

2017-05-12 12:34:28 -0600 received badge  Scholar (source)
2017-05-11 11:36:05 -0600 received badge  Student (source)
2017-05-11 09:33:19 -0600 asked a question Drawing 3D points on a distorted image

I have the intrinsic parameters of my camera (camera matrix and distortion parameters). I also have a 3D point in the camera coordinate frame. I'd like to project that point onto the image, and show the result.

The distortion parameters seemed to be used in two places:

  1. When calling undistort(), which provides me with an undistorted image;
  2. When calling projectPoints(), which transforms my 3D point into a 2D point on the image.

I then add a cv::circle to the image with the resulting 2D point and imshow() the resulting image.

My question is this: Calling undistort() results in a cropped image, so do the resulting points from projectPoints() give pixel coordinates in the original distorted image, or are the pixel coordinates in the undistorted image? Put differently, should I call undistort() before drawing the point on my image if I want the point to be drawn in the right spot? Does undistorting the image before drawing on it compensate for the distortion twice?