Tag Archives: compiter vision

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