Stereo-calibration -- Wrong output size of image

3 visualizaciones (últimos 30 días)
Robert Dupont
Robert Dupont el 8 de Oct. de 2015
Comentada: Dima Lisin el 8 de Oct. de 2015
Greetings,
I am using the stereo-calibration application of matlab and I have some troubling error. After I have put my 15 pairs of images and the chessboards were well recognized I tried to calibrate. The calibration goes well, but when I use the stereo parameters from the calibration, my images are croped from 2048*2048 pixels to 1918*1003. This way, there is no overlap of the two images when I try to make the disparity map. The cameras are seperated by 5.5cm. When I tried initially with my cameras seperated by 50cm, then the output size would be of 2700*8300 pixels, mostly black (and still not usable). I am working at 40-45cm distance.
My question is :
How can I get a satisfactory calibration of my cameras (Seeing that obviously the distance between the cameras seems to be very important) ?
Here are some screenshots of what the application gives me after the calibration :
And here are the images before/after rectification using the stereo parameters :

Respuestas (1)

Dima Lisin
Dima Lisin el 8 de Oct. de 2015
Try exporting the streoParameters object and doing the following:
[J1,J2]=rectifyStereoImages(I1,I2,stereoParams, 'OutputView', 'full');
  2 comentarios
Robert Dupont
Robert Dupont el 8 de Oct. de 2015
Thank you for your answer.
Now I can see the full image, with a bit of black. The size is now 2231*3150.
Sadly when I run the disparity and then the reconstruction, the "scene" I see is only a cone of points. More precisely, I have points in different planes that get bigger and bigger, and the distance between the different planes is also increasing.
The function stereoAnaglyph shows me that there is still a huge difference between the two images ... (Would like to show it, but I reached a limit of image upload)
Dima Lisin
Dima Lisin el 8 de Oct. de 2015
You have to be careful to have the right parameters when you call the disparity function. The most important one is 'DisparityRange'. Display the anaglyph using imtool, and use the ruler widget to measure the disparty for some pairs of matching points. That should give you the idea of what the 'DisparityRange' should be. The default is [0, 64], and that is unlikely to work in your case.
Once you compute the disparity, display it using imshow, and make sure that you can see the silhouettes of objects in your scene.
Another thing to keep in mind is that if your camera 1 is on the right, as you look in the same direction as the cameras, then the disparity will be negative. Then you must change the 'DisparityRange' accordingly, e.g. [-128, 0], or reverse camera 1 and camera 2 and recalibrate.
One more thing. In your calibration, you are getting high errors for image pairs 13 and 15. You should remove those and recalibrate.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by