Camera calibration crashes
While trying to use camera calibration with the command
rosrun camera_calibration cameracalibrator.py --size 8x6
--square 0.03 image:=/camera/image camera:=/camera
the utility crashes, sometimes during start, sometimes when the checkboard is moving in the frame. If the checkboard is in the middle of the frame when the utility starts, then sometimes I can see the checkboard from the GUI and the utility gets the first calibration data, but the utility crashes as soon as I try to move the board. The error messages are always:
OpenCV Error: Assertion failed (blockSize % 2 == 1 && blockSize > 1) in adaptiveThreshold, file /tmp/buildd/ros-groovy-opencv2-2.4.4-1precise-20130301-2025/modules/imgproc/src/thresh.cpp, line 797
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/opt/ros/groovy/lib/camera_calibration/cameracalibrator.py", line 68, in run
self.function(m)
File "/opt/ros/groovy/lib/camera_calibration/cameracalibrator.py", line 134, in handle_monocular
drawable = self.c.handle_msg(msg)
File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 729, in handle_msg
scrib_mono, corners, downsampled_corners, board, (x_scale, y_scale) = self.downsample_and_detect(gray)
File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 399, in downsample_and_detect
(ok, downsampled_corners, board) = self.get_corners(scrib, refine = True)
File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 367, in get_corners
(ok, corners) = _get_corners(img, b, refine)
File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 156, in _get_corners
(ok, corners) = cv.FindChessboardCorners(mono, (board.n_cols, board.n_rows), cv.CV_CALIB_CB_ADAPTIVE_THRESH | cv.CV_CALIB_CB_NORMALIZE_IMAGE | cv2.CALIB_CB_FAST_CHECK)
error: blockSize % 2 == 1 && blockSize > 1
Any ideas what could be wrong and how to fix this?
We are just trying to calibrate a camera and see exactly the same thing.
I'm getting the exact same problem as well using Groovy on Ubuntu 11.10.
Any other case, can you please state your g++ version and whether you are 32 bits or not ? Thx
same issue here. g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Linux xxx 3.2.0-43-generic-pae #68-Ubuntu SMP Wed May 15 03:55:10 UTC 2013 i686 i686 i386 GNU/Linux