Stereo Camera Calibration with ROS and OpenCV

In this tutorial, I’m gonna show you stereo camera calibration with ROS and OpenCV. So you need a pair of cameras, I bought a pair of this USB webcam which is okay for this task.

1)Save the following text under “stereo_usb_cam_stream_publisher.launch

2)Then run the following node to publish both cameras.

3)Now call the calibration node:

Super important:

If you have USB cam with some delays you should add the following “–no-service-check –approximate=0.1”

4)Pose the chess board in different position, and then click on the calibrate and save button.

5) The result gonna be store at /tmp/calibrationdata.tar.gz. Unzip the file and save it under “/home/<username>/.ros/stereo_camera_info

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] my other tutorial, I showed you how to calibrate you stereo camera. After Calibration, we can get disparity map […]

Hitesh
Hitesh
5 years ago

roslaunch stereo_usb_cam_stream_publisher.launch video_device_right:=/dev/video1 video_device_left:=/dev/video2 image_width:=640 image_height:=480 left_camera_name:=left right_camera_name:=right

When I run the above code, the following error shows up:

ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share
ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share

How do I resolve it? Please help.

SevDev
4 years ago

Hi, could someone elaborate on that issue? The problem with cameras out of normal webcams seems to be that they need to be syncronized. Also the professional 3D cams use an ASIC or an FPGA. Thanks.

rulezzz
rulezzz
2 years ago

Hello there same webcam but unfortunately not working in my ubuntu system:

dmeseg:
[ 6447.831829] usb 2-1.5: New USB device found, idVendor=093a, idProduct=2620, bcdDevice= 1.00
[ 6447.831833] usb 2-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 6447.832549] gspca_main: gspca_pac7302-2.14.0 probing 093a:2620
[ 6447.833397] input: gspca_pac7302 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/input/input40

v4l2-ctl –list-devices
USB Camera (093a:2620) (usb-0000:00:1d.0-1.5):
       /dev/video0

I only see black scream on cheese and vlc can you help me to make this work.

5
0
Would love your thoughts, please comment.x
()
x