Ask Your Question

Is there a way to compress an Image?

asked 2011-03-22 07:34:25 -0600

Murph gravatar image

updated 2011-04-03 07:34:02 -0600

Eric Perko gravatar image

I've got a kinect mounted on my robot, and i can view it's camera feed remotely by adding a "Image" to my rviz setup. however, it's really laggy. is there a way to compress the Image stream into something smaller before sending it over the wireless?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-04-01 11:41:40 -0600

Patrick Mihelich gravatar image

The OpenNI driver already uses image_transport to publish images, so you actually don't need to use republish. Assuming you have the image_transport_plugins stack installed, rostopic list should show compressed and theora versions of each image topic.

In rviz, in your Image parameters just click Transport Hints and select compressed or theora from the drop-down.

Using republish does make sense if you have multiple (N) subscriber nodes on the other side. If they all subscribe to the compressed topic, then you decompress each image N times. Better to do the decompression once in a republish node, and pipe the raw output to the N subscribers.

edit flag offensive delete link more

answered 2011-03-22 08:16:33 -0600

KoenBuys gravatar image

Have a look at the image_transport package:

republish in_transport in:=<in_base_topic> [out_transport] out:=<out_base_topic>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-03-22 07:34:25 -0600

Seen: 2,845 times

Last updated: Apr 01 '11