So I'm trying to use opencv_interactive-calibration with the following parameters: opencv_interactive-calibration -ci=4 -h=5 -w=8 --pf=defaultConfig.xml --of=cameraParameters.xml -t=charuco
My config looks like this:
<?xml version="1.0"?>
<opencv_storage>
<charuco_dict>14</charuco_dict>
<charuco_square_lenght>80</charuco_square_lenght>
<charuco_marker_size>50</charuco_marker_size>
<calibration_step>1</calibration_step>
<max_frames_num>30</max_frames_num>
<min_frames_num>10</min_frames_num>
<solver_eps>1e-7</solver_eps>
<solver_max_iters>30</solver_max_iters>
<fast_solver>0</fast_solver>
<frame_filter_conv_param>0.1</frame_filter_conv_param>
<camera_resolution>1280 720</camera_resolution>
</opencv_storage>
I'm using a charuco pattern like this:
The pattern is printed and laminated on A3. It was created like this: ./create_charuco -w=8 -h=5 --ml=50 --sl=80 -d=14 ~/charuco-pattern.png so marker length 50 and square length 80. Obviously if this is pixels it's now meaningless as it's been blown up through printing to A3, but I'm guessing (naively, hopefully) that this is a ratio rather than an absolute size in pixels? I have no idea what --sz (value:16.3) parameter means in terms of scale or units, or if it's needed for charuco pattern.
So the trouble I have is that running the interactive calibrator brings up a window (very slow, over ssh/X) that recognises the aruco symbols when presented and draws lots of blue lines off the right hand edge of the screen, and when you get the entire pattern into frame it gives a white flash and says 'Frame rejected' every time, over and over. It gives no further info so I have absolutely no idea where to go from here, I can't see any kind of debug/log output and it's not producing anything into cameraParameters.xml.
The camera_resolution config setting, what is that for exactly? As the calibrator seems to control the camera through v4l2 (I'm specifying video4) I assume it's setting the resolution - my default resolution for my camera is 640x480 but the preview window seems to be much larger, I'm guessing at least 1280x720. Would be nice to do it in 640x480 somehow as that is the resolution it will always capture in real use.
Help please :)
Also, bonus points if anyone can answer if this calibrator will provide necessary calibration for depth (ie range) measurement, or if is it just for distortion?