Page 1 of 1

Camera calibration

Posted: Tue Dec 31, 2019 11:12 pm
by ducnan
Hi all,

I am trying to calibrate the stereo camera and have several questions.

1. I saw the calibration scripts in the tutorial(https://github.com/realizator/stereopi-tutorial) and it seems like storing the calibration result into many executable files, but I would need a yaml file to feed into a SLAM task. So is there another tool/package that can do the calibration or I could write a simple script that reads the calibration files and export a yaml file?

2. I mainly use the SLP image and would it matter if I calibrate it totally following the tutorial scripts after switching to the Rasbian image? Are there any parameters I need to pay attention to in order to keep them the same?

Thanks in advance and happy new year!

Duncan

Re: Camera calibration

Posted: Wed Jan 01, 2020 6:49 am
by stereomaton
The script is totally related to cameras (it computes focal length, centering of the sensor on the optical axis, lens distortion and so on), so it does not matter if you change the operating system. Also SLP is based on raspbian.
The parameters (matrices) are stored in binary with/by a library called numpy (save doc here: https://docs.scipy.org/doc/numpy/refere ... .save.html) so you can get the content by using the numpy load function (example in above link). Once opened, you can format them the way you want.
Also, there is an updated version (which also work for large fov cameras), but I don't remember the address. Realizator could probably add a note in the README of this repo.

Re: Camera calibration

Posted: Wed Jan 01, 2020 4:36 pm
by ducnan
Thank you very much and it helps a lot.

Duncan

Re: Camera calibration

Posted: Thu Jan 02, 2020 3:28 pm
by Realizator
Stereomaton, thank you for your answer! :-)
The code you've mentioned is our updated code for the camera calibration and depth map (with the fisheye support) is here:
https://github.com/realizator/stereopi-fisheye-robot

I'd recommend to use it instead of old "stereopi-tutorial" code. New code uses updated OpenCV and Python version, has better chessboard detection, and includes all you need without reference to external libs.

Duncan, I have nothing to add to the Stereomaton's answer :-)