O'Reilly logo

Learning ROS for Robotics Programming by Enrique Fernández, Aaron Martinez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making your own USB camera driver with OpenCV

Although we have the two options previously mentioned, this book comes with its own USB camera driver, implemented on top of OpenCV, using the cv::VideoCapture class. It runs the camera and also allows changing some of its parameters, as long as they are supported. This is very simple and it allows setting the calibration information in the same way as with FireWire cameras. Indeed, with usb_cam this is not possible because the CameraInfo message is not available. Hence, params/usb_cam/logitech.yaml the camera_info_url is not set in the parameters file. With regard to gscam, we will have more control.

We can change the camera configuration and also see how to publish the camera images and information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required