8

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)?

Angie Quijano
  • 4,167
  • 3
  • 25
  • 30
j1897
  • 1,507
  • 5
  • 21
  • 41

1 Answers1

5

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.

Community
  • 1
  • 1
Zaphod
  • 1,927
  • 11
  • 13
  • Thanks. But I don't have a catalogue of the endoscope. The model is Karl Storz Image 1 HD Spies. I searched, but I couldn't find any link except for a dead link. https://www.karlstorz.com/cps/rde/xbcr/SID-3A08CC40-46AD7A12/karlstorz-en/3333037_3333037_3333037_3.pdf But in google it shows up as focal length 15-31 mm. But I am not sure if it is legit or not – j1897 Aug 20 '14 at 01:45
  • Maybe contact their customer support and find out the sensor dimensions? I just did a quick google search, and found: https://www.karlstorz.com/cps/rde/xbcr/SID-3A08CC40-46AD7A12/karlstorz-en/3333038_3333038_3333038_7.pdf which, although I may be wrong, indicates that the Image 1 Spies is the processing module which is compatible with different endoscopes. So finding the focal length would be easier if you know the endoscope model number. Also found this, which may help: http://www.surgicalproductsmag.com/product-releases/2005/05/hi-fidelity-imaging-camera – Zaphod Aug 21 '14 at 07:44
  • Thank you for your comments. I finally found the official catalogue and got the sensor width. Now I convert the focal length in pixels (which is obtained from OpenCV calibration) to millimeter using the formula f = fx/mx , where mx = number of pixels per millimeter – j1897 Aug 25 '14 at 08:13