StereoRectify returns incorrect reprojection matrix Q (Bug #1425)


Added by ajsmilutin - over 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:calibration, 3d
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I have known object (simple rectangle) in cameras field of view, so I have acquired it's 3d position using:

solvePnP(pts3d,ptsimg,camMatrix, distCoeffs ,Rot,Trans,true);

Later, I have created disparity map using StereoSGBM.
Afterwards I have used reprojectImageto3d do obtain cloud of points. When I plotted that cloud of points and vector Trans obtained by solvePnP, I have noticed that distance between Trans and cloud of points is always around 50mm.
I have tried to solve that problem for a couple of days until i stumbled upon this post ->

#898

Bearing that in mind, and without any other idea, I have added a single line to my code:

Q.at<double>(3,2)=-Q.at<double>(3,2);

where Q is reprojection matrix obtained from stereoRectify.
Now everything works just fine, and just the way it should be.

I am sure that there is a bug somewhere in stereoRectify, probably at the place specified in already mentioned post.


Associated revisions

Revision acc2ca48
Added by Roman Donchenko over 11 years ago

Merge pull request #1425 from pengx17:master_retina_ocl_fix

History

Updated by Alexander Shishkov about 13 years ago

  • Description changed from I have known object (simple rectangle) in cameras field of view, so I have ac... to I have known object (simple rectangle) in cameras field of view, so I have ac... More

Updated by Alexander Shishkov almost 13 years ago

Duplicate of #898

  • Status changed from Open to Cancelled

Updated by Andrey Kamaev almost 13 years ago

  • Description changed from I have known object (simple rectangle) in cameras field of view, so I have ac... to I have known object (simple rectangle) in cameras field of view, so I have ac... More

Updated by Andrey Kamaev almost 13 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF