[ros-users] Gumstix, uvc_camera and cv_capture

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: [ros-users] Gumstix, uvc_camera and cv_capture
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