3
votes

I am working on stereo camera depth estimation. However, for particular purpose, I need to use two camera with different FOV and focal length.
After a lot of Google research, I know that I can still calibrate the two camera and rectify them to generate disparity map, but I have no idea how to convert disparity map to depth because their focal length is different, which does not satisfy the model in
http://docs.opencv.org/trunk/dd/d53/tutorial_py_depthmap.html

Does anyone have solution?

Thanks!

1
I might be wrong, but I think that when you rectify the two cameras, you end up expressing the images relative to a single camera with a known focal length (otherwise, the whole disparity search loses its meaning). So in the end you have only one focal length to worry about when computing depth.Ash
I used opencv function answers.opencv.org/question/69147/… to find rectify transform. But it also give me two projection matrix with same focal length, I don't know if this is the final focal length I should use to get depth map?王福恩
From what it says here docs.opencv.org/trunk/d9/d0c/…, it seems that yes, the focal length is the same, which makes sense. You only have to be careful about the translation parameter along one of the axes.Ash

1 Answers

0
votes

Have you considered using cv::triangulate() to obtain the (x,y,z) 3D world coordinates ?

I believe your end goal is to obtain a depth map.