Ask Your Question

Revision history [back]

Calibrating camera only for one plane

I want to build a device that measures anything you put on it. It is basically a camera under a glass. But the camera is only responses to infra red light (so I have IR LED strips around the view port). The problem is I am facing is a strategy to calibrate the camera. Due to the lens effect of the camera the image is a bit like a fish-eye.

The picture below shows the concept. I have IR LEDS on 4 side of the view port. The viewport is not all the resoulution of the camera. The camera is 1280x1024) and the viewport or ROI is roughly 1100x600 pixels. In this picture you can see a paper coffee cup and light from ceiling (yeah the ceiling hs some IR content in it but that is not the main problem).

object

I have printed a large checkerboard with 20mm squares and this is how it looks normally (with reduced camera exposure):

checkerboard

So my question is how should I go with calibrating this setup? I tried the "calibrate.cpp" in the OpenCV examples but it does not work...I mean the "undistorted" image that it yields is no different than the original picture. And it does not detect all the squares...it only detects the squares in the centre (like 7x5).

How would you approach such a problem? Where should I begin? Can I get away with this big checkerboard and only calibrate based on one picture? Or I need smaller checkerboard and I move it around the viewport and make more samples for calibration?

Is it enought that I only feed the viewport to the calibration source code (crop the mat to the ROI)?

Calibrating camera only for one plane

I want to build a device that measures anything you put on it. It is basically a camera under a glass. But the camera is only responses to infra red infrared light (so I have IR LED strips around the view port). viewport). The problem is I am facing is a strategy to calibrate the camera. Due to the lens effect of the camera camera, the image is a bit like a fish-eye.

The picture below shows the concept. I have IR LEDS on 4 side of the view port. sides of the viewport. The viewport is not all the resoulution resolution of the camera. The camera is 1280x1024) and the viewport or ROI is roughly 1100x600 pixels. In this picture picture, you can see a paper coffee cup and light from the ceiling (yeah the ceiling hs some IR content in it but that is not the main problem).

object

I have printed a large checkerboard with 20mm squares and this is how it looks normally (with reduced camera exposure):

checkerboard

So my question is how should I go with calibrating this setup? I tried the "calibrate.cpp" in the OpenCV examples but it does not work...I mean the "undistorted" image that it yields is no different than the original picture. And it does not detect all the squares...it only detects picture.

The reason here is I can not lift the checkerboard from the glass that camera sits under it...because of IR lights are not strong enough...if I lift the checkerboard just 10cm from the glass then the squares in the centre (like 7x5).will not be visible to the camera.

I know that for calibration one would need points in infinity:

image_points = P * 3d_points, where P = intrinsic * extrinsic

Here, I can not have the extrinsic parameter.

How would you approach such a problem? Where should I begin? Can I get away

My own idea is to manually select squares in the corner then since their size and numbers will be known I somehow correct the camera with that numbers? But I have no idea what functions out of opencv can be helpful in this big checkerboard and only calibrate based on one picture? Or I need smaller checkerboard and I move it around the viewport and make more samples for calibration?

Is it enought that I only feed the viewport to the calibration source code (crop the mat to the ROI)?case.