[ros-users] Gumstix, uvc_camera and cv_capture

Cedric Pradalier cedric.pradalier at gmail.com
Thu Feb 10 17:18:08 UTC 2011


Hi list,

I've observed something surprising with a small UVC camera on the
gumstix overo. If I use the camera_node from uvc_camera, I get barely
2 fps in 640x480.
On the other hand, if I make a small application using the opencv
cvCapture function, I get close to 10fps at the same resolution.

Here is the cv code in all its complexity:

            CvCapture* capture = 0;
            capture = cvCaptureFromCAM( -1 );
            IplImage *cv_image = NULL;
            ros::Rate loop_rate(10);
            while (ros::ok())
            {
                cv_image = cvQueryFrame(capture);
                try {
                    image_pub_.publish(bridge_.cvToImgMsg(cv_image, "bgr8"));
                } catch (sensor_msgs::CvBridgeException error) {
                    ROS_ERROR("error");
                }
                ros::spinOnce();
                loop_rate.sleep();
            }

            cvReleaseCapture(&capture);


On the same camera on my laptop, both cv_capture and uvc_camera
publish at 10 fps.

I guess that means there is something that would need optimisation in
the uvc_camera/camera_node, but for now I'll be fine with just
reporting :-)


-- 
Cedric Pradalier



More information about the ros-users mailing list