On Thu, Feb 10, 2011 at 12:18 PM, Cedric Pradalier <span dir="ltr"><<a href="mailto:cedric.pradalier@gmail.com">cedric.pradalier@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi list,<br>
<br>
I've observed something surprising with a small UVC camera on the<br>
gumstix overo. If I use the camera_node from uvc_camera, I get barely<br>
2 fps in 640x480.<br>
On the other hand, if I make a small application using the opencv<br>
cvCapture function, I get close to 10fps at the same resolution.<br>
<br>
Here is the cv code in all its complexity:<br>
<br>
            CvCapture* capture = 0;<br>
            capture = cvCaptureFromCAM( -1 );<br>
            IplImage *cv_image = NULL;<br>
            ros::Rate loop_rate(10);<br>
            while (ros::ok())<br>
            {<br>
                cv_image = cvQueryFrame(capture);<br>
                try {<br>
                    image_pub_.publish(bridge_.cvToImgMsg(cv_image, "bgr8"));<br>
                } catch (sensor_msgs::CvBridgeException error) {<br>
                    ROS_ERROR("error");<br>
                }<br>
                ros::spinOnce();<br>
                loop_rate.sleep();<br>
            }<br>
<br>
            cvReleaseCapture(&capture);<br>
<br>
<br>
On the same camera on my laptop, both cv_capture and uvc_camera<br>
publish at 10 fps.<br>
<br>
I guess that means there is something that would need optimisation in<br>
the uvc_camera/camera_node, but for now I'll be fine with just<br>
reporting :-)<br></blockquote><div><br></div><div>I've seen similar discrepancies in performance from the driver based on computer as well. See <a href="http://code.ros.org/lurker/message/20110105.220655.b7e05812.en.html">http://code.ros.org/lurker/message/20110105.220655.b7e05812.en.html</a> (though in that situation, all of the computers in question had enough CPU horsepower to not drop the framerate).</div>
<div><br></div><div>Could you report which camera you are using? Also, no idea if you can get a monitor on the overo, but if you can, you could use guvcview to see if that also experiences a slow down in frame rate when you try to use similar settings to the uvc_camera driver.</div>
<div><br></div><div>- Eric</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
<br>
--<br>
Cedric Pradalier<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</font></blockquote></div><br>