Camera calibration

I’m hoping to start a conversation about camera calibration and test how big the usage/interest is.

Do you need a camera calibration package in Julia?
Do you know how to write such a package?

A lot of the basic pieces are already present in CoordinateTransformations.jl. Automatically detecting, say, checkerboards could be done with libcbdetect. Optimizing the intrinsic and extrinsic parameters could be done with one of the many options available to us in Julia. Or we could do it completely differently, see here, and here, and here.

9 Likes

I’d be interested in this. I’d especially like a mean-variance analysis component of such a package.

2 Likes

Wow, that would be awesome, to have you on board!

I haven’t really used it, but I think it could be helpful here: ImageProjectiveGeometry.jl
I discovered it after playing around with my own DLT solver and Optim to fine tune the solutions, which was mostly unsuccessful.

1 Like

I haven’t been active in this space for a few years, but was an avid amateur photog for a while. Regarding calibration, I jumped to color-spaces, but perhaps you want to go the geometry route, or both?
For the color spaces, I have a full XRite system w/ a ColorMunki monitor and print colorimeter for generating icc profiles, and also color standard “swatches” that you include in the image captured (uh, hard to do that with stars and such though!).
Here are a few links that may help, especially open-source tools or that highlight standards in this area: https://www.argyllcms.com/, and software built using that as a base: https://displaycal.net/ this article lists 4 open-source tools: https://www.linuxlinks.com/monitorcalibration/ hcfr: https://sourceforge.net/projects/hcfr/
There’s also a host of tools for camera calibration to test for back/front-focusing (I used vintage and modern rangefinders, which could be a bit tetchy with focusing low f-stop high aperture lenses at times with perhaps only an inch of depth-of-field range when shot wide-open).
Good luck!

1 Like

Cool stuff. I personally am most interested in the geometry kind of calibration, but all interest is great!

I think a good first step might be to separate between the camera model and the machinery of finding all the parameters. This way multiple implementations of this machinery can be implemented – and even used – in parallel. So how about I start with a basic CameraModels repo and we build on that?

OK, started it off with this:

Please feel free to comment, contribute, or overwrite!

Slightly off-topic … if using printed checkerboard for camera calibration, sub-pixel detection may not
be sufficient, at least if you need ultra-precise calibration.

We found out that iterating between camera calibration and whole bundle adjustment to re-asses further the location of the corers did the trick. That or use mechanical checkerboard.

he he he, awesome. So to clarify, iterating:

  1. guess parameters
  2. optimize
  3. use optimized parameters as guesses for the next optimization

results in higher accuracy? Or do you do an additional step, like undistort the images using the intrinsic parameters, and then detect the corners again?

Also, come on-board on the camera calibration train!!!

Detected corers in sub-pixel accuracy is done only once, but the real-world position of the corners is iterated upon.

Full camera calibration flow is as follows:
Phase 1:

  1. detect corners and perform normal camera calibration assuming planar checkerboard. (openCV)

Phase 2:

  1. given the detected corners the assumed real-world position of them, the distortion coefficients and the camera calibration.
    perform bundle adjustment keeping the camera calibration and distortion coefficients fixed. optimising the
    real-world location of the corners.

  2. calibrate again using the optimised real-world corners. (using openCV)

repeat 1-2 several times optionally weighting outliers less based on the reprojection error.

Sounds cool. I hope to replace the OpenCV part of that with a Julia-version… See this for a first veryvery basic step: