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

Revision history [back]

click to hide/show revision 1
initial version

I have no direct experience with either QImages or ROS image data, but reading the QImage documentation -- and specifically QImage#image-formats -- I came across this:

Monochrome images are stored using 1-bit indexes into a color table with at most two colors.

Looking at some code in various ROS packages that deals with mono8 images, it does not seem that ROS uses paletted images, which could explain your strange results.

I have no direct experience with either QImages or ROS image data, but reading the QImage documentation -- and specifically QImage#image-formats -- I came across this:

Monochrome images are stored using 1-bit indexes into a color table with at most two colors.

Looking at some code in various ROS packages that deals with mono8 images, it does not seem that ROS uses paletted images, which could explain your strange results.


Hm, AFAICT mono8 isn't actually monochrome, but more like 8bit greyscale. According to QImage#PySide.QtGui.PySide.QtGui.QImage.Format QImage does not support 8bit images, at least not without a palette. Perhaps you need to convert the mono8 image to a 16bit or 32bit pp image first?