'I am confusing when calculating stereo camera depth and focal length

I found two methods to get focal length when calculating stereo camera depth

  1. FOV = arctan(D/2F) Where D is the sensor size and F is the focal length.

  2. focal length from cameramatrix or newcameramatrix

Normally manufacturer of the camera provides only the diagonal FOV not horizontal and vertical FOV, so I think first method is not appropriate because horizontal FOV, focal length are needed for depth

But, I found many people using first method for depth. Could you let me know why second method is not used and the difference between camerametrix and newcameramatrix.

if second method is appropriate, should I use focal length from cameramatrix or newcameramatrix?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source