Is it toe in stereo camera must use stereorectifyuncalibrated?

Hi, i would like to ask currently i have toe in stereo camera(or we call convergence/ tilt in camera) and i want to compute disparity map from the stereo image.

The item is flat but due to angled camera, it shows non-consistent depth

How can get constant depth(make it flat) disparity map from teo in stereo camera??dekstop1

Is it i have to use stereorectifyuncalibrated? currrently im using InitUndistortRectifyMap()

removing the undistortion won’t help you (this is only about lens distortion)

maybe you can fit a plane to your points, and fix the problem in 3d

1 Like

Normally after rectification the stereo image should be rectified to flat surface right ??

no. again, the rectification removes the effects of lens distortion (so you get a more exact disparity in the corners of the image(s)) , it won’t change any “angle” between your cameras and any objects in the scene.

how about you simply move your cameras so one camera sits perpendicular/parallel to your desired plane. that would spare you from knowing how to transform 3d points.

ahh noted understand!

Ah , is it means one camera perpendicular to my item, and another one tilt like usual before? I will give a try !

The reason i having tilt stereo camera is because i need to have fine great depth resolution with small object around 20mmx20mm , as from the opencv book

“we want the cameras verging toward each
other (i.e., slightly “cross-eyed”) so that zero disparity occurs at a finite distance (this
might be necessary for greater depth resolution in the proximity of that particular

I really appreciate u guys help! i will give a try on changing one camera to perpendicular while maintain another tilt

i have tried one camera perpendicular and one is angled, the result is worse, i cant get good rectify image

if it gets worse, it did something. try aligning the other camera.

i have tried alot with the baseline and angle among both camera but all cant get desired answer,

i also tried getting corner of my object and use findHomography to make the image becomes frontal view but the corner from both camera might be different due to toe-in

Is there anywhere that i can found example of convergence stereo image that compute disparity without keystone effect??

the cameras should be (almost) parallel. full stop.

1 Like

It means not recommend to use opencv if need the camera to be tilt inward?

no it means your camera should NOT be tilt at all

(irresp. of the cv toolkit you use for calibration)

1 Like