Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why prefer to use uvc_camera instead of cv::Capture when working with OpenCV?

Hi!

ROS offers its own way of grabbing data from cameras (for example: a normal web cam most of us have integrated in our notebooks) using the uvc_camera driver. Now I'm not asking why use this at all. I'm simply curious when exactly should I use it? Imagine you have a web cam and the first thing you want to do with the image data from it is to process it with OpenCV and then publish it to the rest of the running ROS nodes in the system. This means that no other node except the one running with OpenCV in it has access to the camera hence why would I go in this case first for uvc_camera and then for the cv::Mat format, which is required for OpenCV? Note that in the situation above I presume that OpenCV supports capturing from the device and also have in mind that I'm not asking about image_transport, which has the role of hiding the complexity of transferring images between nodes (subscriber/publisher for example) and is not directly responsible for the capturing of data from the device.

Thanks! RB