Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Interactive calibration frame rejected

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: image description

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?

Interactive calibration frame rejected

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: image description

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?

Edit (after a couple more days of frustration): OK, so it appears that the detector is sensitive to ambient light levels, when I've had some free time during the daytime to try it I'm getting successful captures. I'm still getting wierd blue lines off the right hand side of the screen when trying the calibration on an embedded linux computer (odroid) but it is accepting captures now. Wierd, in that in the lower light levels it was still happily detecting all the patterns. I've also tried using inbuilt camera on macbook and plugging my oCam usb3 camera into the macbook and tried the interactive calibrator. I get successful captures and mostly fill the green ghosty things, but it never says successful calibration (see below). Are the captures/results not good enough? image description Should mention I'm using 3.2.0 release on both systems.

Interactive calibration frame rejected

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: image description

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?

Edit (after a couple more days of frustration): OK, so it appears that the detector is sensitive to ambient light levels, when I've had some free time during the daytime to try it I'm getting successful captures. I'm still getting wierd blue lines off the right hand side of the screen when trying the calibration on an embedded linux computer (odroid) but it is accepting captures now. Wierd, in that in the lower light levels it was still happily detecting all the patterns. I've also tried using inbuilt camera on macbook and plugging my oCam usb3 camera into the macbook and tried the interactive calibrator. I get successful captures and mostly fill the green ghosty things, but it never says successful calibration (see below). Are the captures/results not good enough? image description Should mention I'm using 3.2.0 release on both systems.

Edit 2: After more days of frustration. So thanks to tips in the comments I've mounted the pattern on a thicker board for less distortion, and tried to lessen bright light sources for reflections. I'm also using different poses during the calibration. I've also measured the distance between the two closet aruco squares (not adjacent aruco/black or black-black squares, but the closest aruco squares which are on the diagonal) to 70mm and so using command line: opencv_interactive-calibration -ci=0 -h=5 -w=8 --sz=70 --pf=defaultConfig.xml --of=cameraParameters.xml -t=charuco The resolution is 1280x720 and I'm just using built-in macbook camera for now. I'm getting decent recognition of the patterns and poses, better DF (whatever that is - focus depth?) and pretty good RMS 0.612, over 30+ frames. But I'm still not getting any completed calibrations. What am I doing wrong???! From what I understand, a sub-pixel RMS is pretty good and you can see from the circles I'm getting good coverage, so why won't the darn thing complete? Can I tell it to somehow?

image description

Interactive calibration frame rejected

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: image description

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?

Edit (after a couple more days of frustration): OK, so it appears that the detector is sensitive to ambient light levels, when I've had some free time during the daytime to try it I'm getting successful captures. I'm still getting wierd blue lines off the right hand side of the screen when trying the calibration on an embedded linux computer (odroid) but it is accepting captures now. Wierd, in that in the lower light levels it was still happily detecting all the patterns. I've also tried using inbuilt camera on macbook and plugging my oCam usb3 camera into the macbook and tried the interactive calibrator. I get successful captures and mostly fill the green ghosty things, but it never says successful calibration (see below). Are the captures/results not good enough? image description Should mention I'm using 3.2.0 release on both systems.

Edit 2: After more days of frustration. So thanks to tips in the comments I've mounted the pattern on a thicker board for less distortion, and tried to lessen bright light sources for reflections. I'm also using different poses during the calibration. I've also measured the distance between the two closet aruco squares (not adjacent aruco/black or black-black squares, but the closest aruco squares which are on the diagonal) to 70mm and so using command line: opencv_interactive-calibration -ci=0 -h=5 -w=8 --sz=70 --pf=defaultConfig.xml --of=cameraParameters.xml -t=charuco The resolution is 1280x720 and I'm just using built-in macbook camera for now. I'm getting decent recognition of the patterns and poses, better DF (whatever that is - focus depth?) and pretty good RMS 0.612, over 30+ frames. But I'm still not getting any completed calibrations. What am I doing wrong???! From what I understand, a sub-pixel RMS is pretty good and you can see from the circles I'm getting good coverage, so why won't the darn thing complete? Can I tell it to somehow?

image description

ps - I notice in the interactive calibration doc page (http://docs.opencv.org/3.2.0/d7/d21/tutorial_interactive_calibration.html) the sample pictures of the green ghosty things go from edge to edge of the black window, whereas mine have a margin. Is that maybe what's going wrong, and how do I fix that?