Ask Your Question

Is stereoRectifyUncalibrated efficient?

asked 2012-07-10 11:50:35 -0600

Amin Abouee gravatar image

hello everybody, I'm using of OpenCV 2.4 for rectification of images with findFundamentalMatrix and stereoRectifyUncalibrated. nearly 2 weeks ago, I saw a matlab code about rectify and I became interested to compare the result between them. at the first I thought that the result of opencv will be better than matlab but after several experiments, I found that the matlab code is better. but why? I searched in internet about them and I found that they use of two difference algorithm according by 2 papers. I think the opencv uses of "Theory and Practice of Projective Rectification" paper by "Richard I. Hartley" that you can found here.

But the base of matlab algorithm code is a paper from "A. Fusiello, E. Trucco and A. Verri" with "Quasi-Euclidean Uncalibrated Epipolar Rectification" title that you can find here and the matlab source code is here. if you see the compRect.m file, you will notice that they use of non-linear least square method (Levenberg–Marquardt algorithm) to find the extrinsic parameters (rotation matrix and focal point).

And my question: why opencv don't use of second method while the result of that is better than opencv. If somebody used of second method (matlab code) already, please explain his experience.

edit retag flag offensive close merge delete


What is the meaning of "better"? Less distortion? Better results on stereo computation? Fast performance? Could you show some images presenting examples? If you have problems with distortion, maybe the following question can help:

Thiago Santos gravatar imageThiago Santos ( 2012-07-30 07:21:00 -0600 )edit

The one implemented in MatLab could very well use subroutines written in Fortran or C, so their function implementation using a different algorithm could possibly be faster than openCV's implementation.

Pat gravatar imagePat ( 2012-08-22 14:08:40 -0600 )edit

Where can I find a source for the used algorithm in matlab (EstimateUn​calibrated​Rectificat​ion())? I ask this question because on mathworks they only give Hartley&Zisserman as a source but the algorithm itself performs better than the H&S implementation. Any hints given would be useful!

Karido gravatar imageKarido ( 2017-12-12 07:28:47 -0600 )edit

1 answer

Sort by » oldest newest most voted

answered 2012-11-01 01:01:02 -0600

Mahdi gravatar image

I think one reason that OpenCV uses the first one is the date of the publication released! Maybe the one who contributed the stereoRectifyUncalibrated did not know about the method.
It would be nice that if found the second one useful, contribute to the opensource community.

edit flag offensive delete link more

Question Tools


Asked: 2012-07-10 11:50:35 -0600

Seen: 2,177 times

Last updated: Nov 01 '12