4

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!

王福恩
  • 41
  • 2
  • 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 Jul 23 '17 at 15:24
  • 1
    I used opencv function http://answers.opencv.org/question/69147/where-are-the-docs-for-pythons-cv2stereorectify/ 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? – 王福恩 Jul 23 '17 at 16:05
  • From what it says here http://docs.opencv.org/trunk/d9/d0c/group__calib3d.html#ga617b1685d4059c6040827800e72ad2b6, 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 Jul 23 '17 at 20:24

1 Answers1

0

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.

mal
  • 143
  • 2
  • 12