Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you're using ROS, it might be better to use usb_cam package to open a usb camera. You can subscribe to the image topic, use cv_bridge to convert sensor_msgs::image to cv::Mat, process your image and publish or send service calls from there.

If you're using ROS, it might be better to use usb_cam package to open a usb camera. You can subscribe to the image topic, use cv_bridge to convert sensor_msgs::image to cv::Mat, process your image and publish or send service calls from there.there. This way you'll always get the latest frame for your callback.