Search code examples
c++opencvcameracamera-calibrationstereo-3d

Camera sensor size


I am trying to do some stereo reconstruction using two cameras hooked up as rig configuration (Microsoft HD3000 CMOS cameras with which I am grabbing 640X360 images). At some point in the stereo matching algorithm I need to specify things like 'individual sensor element size' to be able to get some distance measurement consistent with the view scene. How do I go about finding out the sensor size ? I should mention that in the camera datasheet this info is not present nor is the focal length which are indispensable for accurate measurements.


Solution

  • If you cannot find the specifications of the sensor in the internet and the camera directly saves JPEG images, you can check the EXIF header and see if it has what you want. The problem is that even if it's present in EXIF might not be accurate.

    The other way is to get a spare camera and separate the lens to have access to the censor. Then measure the width (in mm) of the censor. If you think the pixel might not be square then need to measure the height (in mm) as well. And since you have the dimensions of the image in pixels you can find, say the width of an individual pixel by sensor_width_in_mm / images_width_pixels.

    If believe the width/height of pixels in mm is all you need for metric reconstruction. Once you have that you can convert all other measurements from pixels to mm. Well, I assume you have already calibrated the camera and have the internal matrix. Please let me know how it goes.