Ask Your Question
0

OpenCV C++ Stereo Calib Example

asked 2016-04-07 08:42:21 -0600

zegufe gravatar image

Hello Everyone,

I want to run the OpenCv Stereo Calib samples. But I have a error message like "0 pairs have been successfully detected. Error: too little pairs to run the calibration "

I created a folder under data folder. It's name is Stereo. And there is a pair of image like 1.jpg and 2.jpg in the stereo folder. When I run the program I have error message mentioned above.

You can see my pictures in the attachment.

What should I do?

C:\fakepath\1.jpgC:\fakepath\2.jpg

Thank you.

edit retag flag offensive close merge delete

Comments

Did you actually specify the number of corners in the chessboard? Usually, when it fails in detecting the corners it is related to the number you have(n't) specified.

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2016-04-07 09:57:08 -0600 )edit

Thank you for your help Mathieu. Now I built opencv samples. Many samples work correctly. But when I run cpp-example-sereo_calib sample the program display an error message like "0 pairs have been successfully detected. Error: too little pairs to run the calibration"

I checked and It has all the necessary data like left and right images xml file.

zegufe gravatar imagezegufe ( 2016-04-09 05:39:19 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-04-11 02:15:27 -0600

To launch this sample, you need to specify the number of corners of your image:

./stereo_calib -w=4 -h=6 stereo_image_list.xml

from your sample images. If you launch the program without the right XML file or with a corner width or a corner height higher than in your image, the detection can't find the pattern and is returning this message. So, to ensure everything is working fine, launch the default OpenCV stereo file (I'm assuming you are launching the executable from the sample/data directory):

../cpp/stereo_calib -w=9 -h=6 ./stereo_calib.xml

This should show you the sample images of OpenCV with the correct corners detection.

Depending how you have generated your XML list of images, it may require that you are in the same folder as the images (relative or absolute path to images).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-07 08:42:21 -0600

Seen: 2,497 times

Last updated: Apr 11 '16