aruco / charuco calibration from streaming video or images

asked 2018-10-05 09:02:45 -0500

Rusty gravatar image

I'm trying to run calibrate_camera_charuco based on a streaming video source. The "-v" option picks up the stream just fine and pressing "c" will capture images, but the issue is that tapping any key to advance to the next frame goes way too slowly. I need to move the charuco board into different positions and I can't advance fast enough to keep up.

Before I came across opencv_contrib I had been using the calibration utility from the aruco 3.0.11 distribution on the aruco site on SourceForge and it actually has an option to calibrate from a directory full of files. I used the "-vf screenshot" option on mplayer to capture stills and then fed them in and it worked fine. My impression however is that the SourceForce distribution is out of date and not necessarily compatible with the aruco built into opencv_contrib. In fact the 3.0.11 release had a syntax error and didn't even build until I fixed it. It also doesn't seem to support the charuco boards which the OpenCV docs say will give better results.

I'm probably just going to modify the calibration routine to accept images unless anyone knows of an easier way.

edit retag flag offensive close merge delete


using images instead of video seems a good idea, since you can weed out "bad" ones after recording it.

maybe you don't even have to "hack" the code: VideoCapture can read from a folder of images, given you gave them "numbered" filenames, and use it like: VideoCapture cap("my/folder/image_%05d.png")

berak gravatar imageberak ( 2018-10-06 02:13:50 -0500 )edit

Thank you that works great! There are more details in this post

Rusty gravatar imageRusty ( 2018-10-09 16:22:27 -0500 )edit