Ask Your Question
0

Reprojection error with opencv

asked Feb 10 '16

MariaR gravatar image

updated Dec 9 '19

Akhil Patel gravatar image

Hi, I'm looking for a method to obtain all the reprojection errors in a calibration. I know that the functions calibrateCamera and StereoCalibrate returns the final reprojection error but I need the maximum of all reprojection errors used for the final reprojection error calculation.

I have found the code for calculate all the reprojection errors but I'm interested in a more automatic method.

Is there any function to get all the reprojection errors calculated by the function calibrateCamera in openCV?

Thanks!

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Feb 10 '16

updated Feb 10 '16

There is cv::projectPoints which does exactly that. Just give it the objectPoints you passed to calibrate camera, the intrinsic calibration and the rvec, tvec that calibrateCamera returned and it will give you the projected points. Just compute their distance to the imagePoints you passed to calibrateCamera.

Preview: (hide)

Comments

Thanks for your answer.

I'm doing that.

But previously I have done a calibration with calibrateCamera and openCV calculates at this moment all the reprojection errors, so my question is if there is a method to get back all the reprojection errors calculated by OpenCv instead of to recalculate them with cv::projectPoints.

MariaR gravatar imageMariaR (Feb 10 '16)edit

cv::calibrateCamera does not return the values so where do you expect to get them?

FooBar gravatar imageFooBar (Feb 10 '16)edit

Hi, it's for this reason that I posted the question because I don't know if a supplementary function to get them exists! I suppose by your answer that the solution is to use the function cv::projectPoints... Thanks again for your answer!

MariaR gravatar imageMariaR (Feb 15 '16)edit

Question Tools

1 follower

Stats

Asked: Feb 10 '16

Seen: 10,734 times

Last updated: Feb 10 '16