[ros-users] Problem calibrating stereo camera

Sacha Aury sacha at shadowrobot.com
Fri May 28 15:11:01 UTC 2010


Hi,

I already sent a mail to the mailing list for that subject, but with a
wrong topic, so I ask again. Sorry for the double post.

I am trying to use a custom stereo camera. I did not calibrate it, but I
get a pretty good disparity map :
http://fly.yozora-irc.net/shadow/Capture-2.png
The problem is that I am getting bad values for some parameters in
camera_info, such as K and P, which are infinite. So I try to calibrate
using image_pipeline/camera_calibration. If I do so using 30 fps/320*240
resolution, I get a crash when I click on calibrate : 

>>> epipolar error: 0.857935751957
>>> OpenCV Error: Assertion failed (src.type() == dst.type()&&
dst.size()
>>> == mapx.size()) in cvRemap,
>>>
file /opt/ros/boxturtle/stacks/vision_opencv/opencv2/build/opencv-svn/src/cv/cvimgwarp.cpp, line 3083
>>> Exception in thread Thread-9:
>>> Traceback (most recent call last):
>>>     File "/usr/lib/python2.6/threading.py", line 532, in
__bootstrap_inner
>>>       self.run()
>>>     File
>>>
"/opt/ros/boxturtle/stacks/image_pipeline_copy/camera_calibration/nodes/cameracalibrator.py", line 59, in run
>>>       self.function(m)
>>>     File
>>>
"/opt/ros/boxturtle/stacks/image_pipeline_copy/camera_calibration/nodes/cameracalibrator.py", line 233, in handle_stereo
>>>       lscrib = self.c.lremap(lrgb)
>>>     File
>>>
"/opt/ros/boxturtle/stacks/image_pipeline_copy/camera_calibration/src/camera_calibration/calibrator.py", line 407, in lremap
>>>       cv.Remap(src, r, self.lmapx, self.lmapy)
>>> error: src.type() == dst.type()&&   dst.size() == mapx.size()

So I try using 15fps/640*480, which is better. The only problem is that
I can't get any good calibration parameters : epi is about 6-8 and the
size is totally wrong. Moreover, I have a strange problem, the camera
seems to be zooming after clicking on 'calibrate' : 
http://fly.yozora-irc.net/shadow/Capture-4.png
http://fly.yozora-irc.net/shadow/Capture-5.png

I hope someone can help me.

Thanks

Sacha





More information about the ros-users mailing list