Tag Archives: camera calibration

How to use a calibrated camera in ROS

In my previous tutorial I showed you how to calibrate a camera with ROS. In this tutorial, I’m gonna show you how to rectify the images from coming from your camera.

First, open your text editor and paste the following text into it:

make the necessary changes and save it under usb_cam_stream_publisher.launch

Now run it:

Open another text document and paste the following into it:

save it under image_proc.launch. Now run it:

The codes are available on my Github

 

Calibrating a Monocular Camera with ROS

ROS use OpenCV for camera calibration but the format that it stores the data is different than OpenCV. Also, you need to know where to place the camera calibration files so ROS can find it and publish it.

1.First, you need to install usb cam package from ROS and uvcdynctrl to disable autofocus:

2.Open a terminal and run roscore:

3. Turn off the autofocus of your camera (if your camera supports autofocus):

check if your camera supports autofocus:

turn off the autofocus:

check if the autofocus is off:

4. Publish the data from your camera, for example, via use usb_cam:

5.Connect camera_calibratio to the node publishing camera images: (node and topic name should be adjusted: image:=/usb_cam/image_raw camera:=/usb_cam) and a checkerboard with 0.02517-meter squares:

 

6.After getting enough images click on the calibrate and then save. If you click on the commit button if will copy calibration data into:

 

7. Fix the calibration URL. Put the YAML file in the