Ask Your Question

Ripples in stereo disparity image?

asked 2014-03-13 14:53:24 -0500

dconner gravatar image

updated 2014-03-14 12:49:05 -0500

I have a stereo image captured on relatively flat ground with the camera mounted above ground and pointed down at angle relative to horizontal. The source images are already rectified and aligned using the camera API.

When I calculate the disparity image in OpenCV using either BM or SGBM, the resulting disparity image shows "ripples". When this data is re-projected into 3D space using cv2.reprojectImageTo3D() the 3D points show a curved ground surface (e.g. warped around view axis) with ripples along the view axis. The re-projection matrix Q is calculated by cv2.stereoRectify() using the focal lengths (fx,fy) and Baseline data from rectified images, but use 0 distortion since the source images were already rectified and aligned.

My best guess is that the warping is due to the camera "calibration" parameters I'm using (fx,fy,B) (based on 3rd party calibration values), and that the ripples are based on the limits of subpixel interpolation. (I do not see this effect using the Point Grey libraries, so it is not the images themselves.)

Any suggestions on how to improve?

(Unfortunately, I can't post the relevant images.)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-03-14 12:37:52 -0500

xaffeine gravatar image

I think you need to recalibrate your cameras. If your raw images are not warped but your rectified images are warped, that is your problem.

edit flag offensive delete link more


Edited above to clarify. I start the stereo process with two rectified images and then use Q matrix calculated by cv2.stereoRectify() with focal length and Baseline data, but 0 distortion to project disparity into 3D space using cv2.reprojectImageTo3D. It is the 3D points that show show warped surface and ripples (ripples are also apparent in disparity image)

dconner gravatar imagedconner ( 2014-03-14 12:45:37 -0500 )edit

Question Tools


Asked: 2014-03-13 14:53:24 -0500

Seen: 380 times

Last updated: Mar 14 '14