[ros-users] image_pipeline optimization

Bill Morris morris at ee.ccny.cuny.edu
Fri Jun 18 17:17:09 UTC 2010


On Fri, 2010-06-18 at 09:53 -0700, Vijay Pradeep wrote:
> Hi Bill,
> 
> What is the encoding of the images that you're viewing?
> > rostopic echo [image_topic]/encoding

rgb8

> The following is based on image_view/src/image_view.cpp:
> It looks like image view converts all incoming messages into a "bgr8"
> encoding.  Thus, if the incoming format is anything other than bgr8,
> cv_bridge will convert every pixel to bgr8, possibly resulting in the
> high CPU load:
> 
>     if (img_bridge_.fromImage(*msg, "bgr8"))
>       cvShowImage(window_name_.c_str(), img_bridge_.toIpl());
>     else
>       ROS_ERROR("Unable to convert %s image to bgr8",
> msg->encoding.c_str());
> 
> I'm guessing this could be optimized a bit.

I'll try getting the camera driver to output bgr8 and see how that goes.
I wanted to check if someone else had done the work before I started
profiling the code.





More information about the ros-users mailing list