chilitags icon indicating copy to clipboard operation
chilitags copied to clipboard

Automatic camera calibration

Open ayberkozgur opened this issue 10 years ago • 1 comments

We should try and implement the automatic calibration of the camera during runtime. Assuming that we don't have nonlinear camera elements (spherical, cylindrical etc.) and that the focal point is in the middle of the image, we effectively need to calibrate just two numbers: elements (1,1) and (2,2) of the calibration matrix, i.e the focal lengths in pixel units.

OpenCV does this with a checkerboard. We can do this with our tags: we know their dimensions beforehand. While we see any tags, we can tune the focal lengths until its 3D transform back to the screen matches its actual place on the screen (detected via FindQuads). We should even be able to calculate the focal lengths exactly using algebra.

Here is what I propose for an application that uses Chilitags; there are exactly two alternatives and no more or no less:

  • The application provides a calibration file that is empty/nonexistent, we do this calibration for the first e.g 1000 frames and dump the values to that file. The next time that application runs, the values will be there.
  • The application provides the calibration values without a file.

ayberkozgur avatar May 02 '14 14:05 ayberkozgur

An alternative to all this: Do the calibration all the time. This would make more sense if we calculated the focal lengths algebraically each frame.

ayberkozgur avatar May 02 '14 14:05 ayberkozgur