1 | initial version |
2 | No.2 Revision |
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.