ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Large black areas on rectified stereo images

asked 2016-01-27 05:20:29 -0500

Ariel gravatar image

updated 2016-01-28 02:34:12 -0500

I'm using two RGB cameras. They are rotated, one clock-wise and the other counter clock-wise. I'm calibrating them with Ros Stereo Calibration node which is based on OpenCv. The output I get the camera matrix, projection matrix and R and T from cv::stereoCalibrate. The stereo_image_proc node outputs the rectified images that you can see below:

image description

They seem rectified, they are both "facing" the right way but there is a HUGE area of only black pixels......why is that? Does it have to do with some parameter in cv::stereoRectify that I should change?

Does it matter if I hold the calibration patter horizontally or vertically when calibrating? Could that be the issue?

Thanks for the help.

ps: This is a continuation of this question (when I was having completely black rectified images because I was doing the calibration wrong).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-29 18:53:47 -0500

Vincent Rabaud gravatar image

It's probably due to your physical setup, please provide some description / a picture of the setup. There might be a big disparity between your images, usually those give such black areas.

edit flag offensive delete link more

Comments

Due to copyright issues I cannot post a picture of the setup. It's a 3d printed pair of glasses and due to it's shape and where the USB connector of the cameras, they need to be rotated so the connector is on the edge of the piece.This implies that there is a rotation of -90 and +90 for each camera

Ariel gravatar image Ariel  ( 2016-01-30 12:47:38 -0500 )edit

I modify the flags in calibrateCamera to CALIB_ZERO_TANGENT_DIST|CALIB_FIX_K1|CALIB_FIX_K2|CALIB_FIX_K3|CALIB_FIX_K4|CALIB_FIX_K5|CALIB_FIX_K6 and now there are no more dark areas. The remaining issue is that the orientation of the rectified images is wrong, 180.

Ariel gravatar image Ariel  ( 2016-01-30 12:56:55 -0500 )edit

If I understood correctly the code, it assumes that booth cameras are horizontally aligned. So, this is what I should update

Ariel gravatar image Ariel  ( 2016-01-30 12:57:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-01-27 05:20:29 -0500

Seen: 1,074 times

Last updated: Jan 29 '16