# Stereo camera pair focal lengths

I came across the standard representation of stereo cameras where they are side to side and the epipolar lines are the same image scan line and the cameras have the same focal length. Source: http://vision.deis.unibo.it/~smatt

Now, do all stereo camera pairs need to have the same focal length? And if not then how does that change the stereo depth calculation?

Thank you.

You're just using the focal length as part of a camera model.

All you really care about is exactly what the image you posted depicts - that you can correlate a particular pixel with an angle. If you know the angle to a point of interest from one camera, and you know the angle to the same point of interest from another camera, and you know how far the cameras are apart, then the law of sines can tell you where that point of interest is actually located.

Like I said above - what you really want to know is how a pixel relates to an angle. If you know that your key point is located 15 pixels from the left edge (the right camera in your image), what angle does that make between the image receptor and that key point? That depends on the focal length of the camera. A lot of techniques use the pinhole camera model, and I believe this is sufficient for most cameras, but especially if you wanted to use a fisheye lens or similar then you need to rectify your output image in addition to applying the camera model.

This might be a straightforward process, but it can definitely get complicated in a hurry, especially if you can't find documentation regarding the characteristics of the lens you're using.

There is nothing that forces both cameras to have the same focal length, but there is also no reason to use different cameras. In a stereo setup you want both cameras to see the same region of the world as only the objects in the overlapping region can be reconstructed. If you use a zoom-lense and fisheye, the overlapping region would be minimal and you could only use a small path of your fisheye-image.

You also want to match the two images so that both camera should have a similar characteristic (consisting of lense, sensor and settings). The similar both cameras are, the better the matching.

So you could built a stereo camera with different camera, but you don't want to.