# aruco / charuco calibration from streaming video or images

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 close merge delete

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")