ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Converting a Compressed Image to QImage

asked 2015-03-25 10:03:15 -0500

David L-B gravatar image

Hi all,

I need to create a camera feed viewer that will need to run on very limited bandwidth networks. As such I want to use Compressed images instead of the raw image.

My application is python and uses PyQt for the gui.

How can I convert the /sensor_msgs/Compressed message to a QtGui.Qimage ?



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-14 08:32:11 -0500

David L-B gravatar image

Found it myself:

qimage = QtGui.QImage.fromData(
imageMain = QtGui.QPixmap.fromImage(qimage)
edit flag offensive delete link more



from PyQt4 import QtGui

peci1 gravatar image peci1  ( 2015-09-14 20:50:10 -0500 )edit

Can you elaborate how to give input to using publisher/subscriber ?

beingtrippy gravatar image beingtrippy  ( 2020-08-15 00:07:15 -0500 )edit

Have a look at ImageTransport::Publisher: .

peci1 gravatar image peci1  ( 2020-08-17 09:18:33 -0500 )edit

Question Tools


Asked: 2015-03-25 10:03:15 -0500

Seen: 1,706 times

Last updated: Apr 14 '15