Camera calibration and reconstruction for fish experiments

The last few months I have been working hard on the sophisticated new experimental set-ups in the lab with which we will be able to get high spatial and temporal resolution tracking of large schools of fish, in tanks that are up to 3x3m in size!

To get highly accurate spatial data of the fish we need to correct for the distortion of the camera lens, which almost all lenses have to some extent. I just finished the script (in Python) that enables us to undistort the image from a camera using functions in opencv based on a video of a moving checkerboard.

Me calibrating a camera with a checkerboard pattern, with colours showing the output of my python script, with a school of 1000 moderlieschen in the background :)

Me calibrating a camera with a checkerboard pattern, with colours showing the output of my python script, with a school of 1000 moderlieschen in the background :)

It works pretty well already, even with non-optimal videos. Next step will be to stitch the videos of multiple linked camera’s.