Problem calibrating with video

asked 2014-06-26 14:17:16 -0500

I am trying to calibrate a camera using a recorded video taken from it. Rather than write a program to do this, I am using the example program cpp-example-calibration. Here is how I am calling it:

opencv/build/bin/cpp-example-calibration -w 3 -h 4 -s 3 -o parrot.yml -oe -V video.mp4

where video.mp4 is in the current directory, and parrot.yml does not yet exist.

However, when I run this, I get this error: 'Could not initialize video (0) capture'. My computer does not have a webcam, so I don't know if it is trying to find a webcam and failing, or if this error is generated by some problem reading the video file. I played the video in VLC and it is valid. I plugged a webcam into my computer, and ran the same program with the same arguments, but without -V or video.mp4. That worked fine, but I need to calibrate this non-webcam camera.

What am I doing wrong? How can I calibrate this camera?

edit retag flag offensive close merge delete