I am using OpenCV calibration method to determine the focal length of my endoscope.
http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
And I am getting a focal length which is in pixels. But I want this to be in millimeter and I do not know the sensor dimensions. How can I calculate the focal length in millimiter (mm)?
Refer to this article, and this answer.
The intrinsic matrix contains 5 intrinsic parameters. These parameters encompass focal length, image format, and principal point. The parameters \alpha_{x} = f \cdot m_{x} and \alpha_{y} = f \cdot m_{y} represent focal length in terms of pixels, where m_{x} and m_{y} are the scale factors relating pixels to distance and f is the focal length in terms of distance.
So if you know the size of the sensor and hence the physical size of every pixel, you can derive the focal length in mm, albeit an approximation. Still best to look up the endoscope's datasheet if you need a more precise number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With