cv::projectPoints giving bad results when undistorted 2d projections are far
Hello guys,
I'm using opencv to calibrate my cameras and I use distortions up to K6. When I use cv::projectPoints, sometimes it gives me really bad projections and when I checked to project without distortion, the points that are badly projected are a bit far outside the image. So it is the distortion that is done poorly and is giving really bad 2d coordinates (sometimes inside the image!!).
I was wondering if there is a way to project points without distortion and predict which ones would be badly distorted (I use up to K6 distortion coefficients).
I'm not sure about that, but I read somewhere that using more than the usual 4/5 distortion coefficients in this function sometimes lead to bad results. Try to search here in the forum first. Just to give a try, use the function with less coefficient and see if the result is acceptable or not. Otherwise you need to investigate to something else. There is also undistortPoints function, you can try to use it to remove the distortion effect on your point and then feed projectPoints with a null/empty distortion coefficients
I found some code that allow to predict if distortion will go well or not but it only works with calibs going no more than K3. I was wondering if there is something for calibs going up to K6.
Try with the workaround I suggest to you, so, undistortPoint and then applying projectPoints
I have a similar problem and I'm wondering if you can share the code to allow to predict wether the distortion goes ok. In my case, the suggestion from @HYPEREGO doesn't work, I need the projection of my points in the distorted image. Going back and forth is a waste of time.. at least this is my point of view
I just created a new question with a more extended analysis of the issue https://answers.opencv.org/question/2...