Re: [ros-users] Gumstix, uvc_camera and cv_capture

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Gumstix, uvc_camera and cv_capture
On Thu, Feb 10, 2011 at 12:18 PM, Cedric Pradalier <
> wrote:

> 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 :-)
>


I've seen similar discrepancies in performance from the driver based on
computer as well. See
http://code.ros.org/lurker/message/20110105.220655.b7e05812.en.html (though
in that situation, all of the computers in question had enough CPU
horsepower to not drop the framerate).

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.

- Eric


>
>
> --
> Cedric Pradalier
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>