0

I've already seen the answer about the crop factor.

I'm writing a small software for motion tracking (from two cameras, videos) in 3D space and research. To do that, I need some information about cameras. Sensor size and pixel size relationship is one of them.

For some things, I need the sensor size, for other, pixel size, elsewhere, focal length. I need to understand if and what is the relationship between the two, and is it possible to calculate one or another.

At the moment I have a plain Canon A720 IS. The listed focal length is 5800, sensor size is 1/2,5'' (5.744 x 4.308 mm) and the pixel size i 3,1µm² (~1,76µm). How are these numbers related (mathematically)? Is there a way to calculate pixel size from the sensor/resolution/focal length/whathaveyou?

PS: After calibrating my camera with OpenCV (inaccurately, but close enough for debugging), I got a focal value of 633. This has to be multiplied by sensor size, so I end up with a value of 253,2. How is this related? This is nowhere near 5800µm, Canon-listed focal length, and 4620µm, for which I am getting the most accurate 3D positions.

2

Those numbers aren't directly related in any way:

  • The sensor size is the physical size of the sensor.
  • The focal length is how much the lens is magnifying stuff. Note that the A720 has a zoom lens with a focal length which varies from 5.8 mm (5800 µm) to 34.8 mm.
  • The pixel size is the size of each individual pixel on the sensor. This obviously relates to the overall sensor size, but only by the number of pixels on the sensor. Without that, they're independent numbers.
  • That's depressing. And sorry, I've missed µm. 5,8mm is 5800µm. – Petersaber Jul 14 '15 at 11:44
  • 1
    @Petersaber It's basic geometry. If that's depressing... well, life is going to be hard for you in general! – Please Read My Profile Jul 14 '15 at 14:09
  • @mattdm "Those numbers aren't directly related in any way" - that's depressing. I can't have the users of my app dump the entire specification of their cameras... sure, I can get pixel size, but I need to know the total resolution, and not just the picture, right? And the focal length numbers I got just don't match, doesn't matter how I do them. – Petersaber Jul 14 '15 at 20:19
  • Your alternative is to have a large database of values. How do you imagine this working? – Please Read My Profile Jul 14 '15 at 20:26
  • @mattdm user inputs a video with a checkboard, inputs sensor size, OpenCV computes what I need using the checkboard calibration. One of the reasons I am asking this question is to confirm I got the good results. Another option is (both will be included in the end app) user inputs focal length, sensor size, pixel size, (preferably only sensor size, as pixel size varies madly from source to source), and simplefied math takes over. – Petersaber Jul 14 '15 at 21:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.