Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Charuco Camera Calibration from video - console always close immediatly, why?

Hi Together,

I am tryinig the last days to implement the Aruco-Markers with OpenCV and VisualStudio 2017 C++. First I calibrate my camera with the normal checkerboard from OpenCV. Due to a flipping Z-Axis I want to calibrate my camera with the Charuco board. I am an absolute beginner at programming and using all these fancy things like libaries and so on for the first time.

I used the example of the of the "opencv_contrib-master\modules\aruco\samples\calibrate_camera_charuco.cpp". This are my options for the calibration:

    const char* keys =
    "{w        |     5  | Number of squares in X direction }"
    "{h        |     7  | Number of squares in Y direction }"
    "{sl       |   0,03465    | Square side length (in meters) }"
    "{ml       |   0,02086   | Marker side length (in meters) }"
    "{d        |    16   | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
    "DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
    "DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
    "DICT_7X7_100=13, DICT_7X7_250=14, DICT_7X7_1000=15, DICT_ARUCO_ORIGINAL = 16}"
    "{@outfile |<none> | Output file with calibrated camera parameters }"
    "{v        |  VideoCharucoBoard.MOV     | Input from video file, if ommited, input comes from camera }"
    "{ci       |    | Camera id if input doesnt come from video (-v) }"
    "{dp       | charucoBoardKalibrierungsdaten.txt     | File of marker detector parameters }"
    "{rs       | false | Apply refind strategy }"
    "{zt       | false | Assume zero tangential distortion }"
    "{a        |       | Fix aspect ratio (fx/fy) to this value }"
    "{pc       | false | Fix the principal point at the center }"
    "{sc       | true | Show detected chessboard corners after calibration }";

I have my Video "VideoCharucoBoard.MOV" in the project folder. It compile with no errors or warnings, but the console only opens for a few milliseconds. I also added the "opencv_ffmpeg331_64.dll" to the project folder and added the include paths and linker (also needed for the aruco detection, which works by the way with no problems...).

Thank you for your help :-) Sarah

Can anybody help me on this problem?