How to calibrate OpenPTV for a two perpendicular camera setup


How to calibrate OpenPTV for a two perpendicular camera setup

If you know about Lagrangian particle tracking, you’re already my hero. It appears only about 40K times on Google search https://goo.gl/4srLXN . Even more so if you know what turbulence is :) In any case, this is just an explanation how to setup two cameras to track objects in three dimensions using our great open source particle tracking velocimetry software, OpenPTV (which is not an open personal transportation vehicle which is also abbreviated openptv). If you don’t have this software installed yet, you miss a lot of fun. So go ahead and follow the installation instructions on ReadTheDocs.org

Note that typically we deal with the three dimensional flows and we need a three dimensional tracking of multiple objects (particles, blobs, droplets, bubbles, mouses, moths, fish, larvae, algae, people, cars, trucks, etc. ). For all those cases three- or four-camera systems are recommended.

The two dimensional case

We start with the photo of a setup, generously provided by Prof. Atle Jensen group at UiO.

You see two cameras looking at 90 degrees into a water tank with a calibration target inside. From top it looks schematically like

What I added to the original sketch is the coordinate system that follows the OpenPTV conventions: z axis is the one that is pointing out from a calibration target (a flat plate with dots or holes visible by the cameras, better if it’s a 3D body that provides also some depth information). Typically we set it as a positive direction of z but it can also be negative (i.e. z into the calibration target). The ‘x’ axis is from left to right if you’d look at the calibration target. E.g. the two dimensional picture is:

On this image we also mark 4 points that we will use later for the manual part of the calibration process. There is also a need for a text file that contains 3D positions of all the points that the cameras might see, e.g.

1    0.0    0.0    0.0
2    10.0   0.0    0.0 
3    20.0   0.0    0.0 
...

66 50.0 100.0 0.0

You can find all the necessary parameters and files in this repository on Github, this file is called cal/flat_target.txt

Practical info

So, how does one proceed with the calibration process:

  • install OpenPTV and watch few tutorials to get a grasp of this software

https://www.youtube.com/watch?v=S2fY5WFsFwo https://www.youtube.com/watch?v=_JxFxwVDSt0&t=1s https://www.youtube.com/watch?v=z1eqFL5JIJc&t=6s

  • Clone a repository with the demo files
  • Understand what is inside:

Orientation files, ends with .ori that position the cameras (this one is for the Camera 1, see above)

-339.12163414 12.51846502 363.96393492    
-0.01399939 -0.55563970 -0.01213911
0.8495006  0.0103127 -0.5274869    
-0.0047539 0.9999180 0.0118930
0.5275663 -0.0075955 0.8494799
-7.8716   0.4761     
39.9369
-112.356979454138212   -0.515525265160502   112.999999988717221

and Camera 2:

    358.52047943  6.98501315 350.51829543
-0.00012099 0.62143310 -0.00205793

0.8130432 0.0016732 0.5822009
-0.0021284 0.9999977 0.0000984
-0.5821994 -0.0013191 0.8130449

7.5097 0.7160
42.5406

113.000009999999975 0.000010000000000 113.000000000000000

The rest is quite well explained on our tutorial (if video wasn’t enough) http://openptv-python.readthedocs.io/en/latest/tutorial.html

Please, don’t hesitate to ask questions. New members are very welcome on our Google groups forum https://groups.google.com/forum/#!forum/openptv


https://medium.com/@alexlib/how-to-calibrate-openptv-for-a-two-perpendicular-camera-setup-bcde3ad30d59

comments powered by Disqus