Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Displat Depth image in PyQT4
I wish to display a 32FC1 depth image into PyQT4 but it seems that PyQT4 does not support this format. May I know what alternative can I do to display this type of Image?
May I know what alternative can I do to display this type of Image?
You could search for a library which can convert this format into something Qt supports (like PNG or JPEG).
Thanks for the input, unfortunately that does not solve my problem, what I want to do is to display a 2D depth map on PyQT.
what I want to do is to display a 2D depth map on PyQT
You can show pictures in a QLabel:
Or you can paint the picture on a widget in its https://doc.qt.io/qt-5/qwidget.html#paintEvent
Hi thanks for the input again,
I understand QT can display color images. But what i really want is to display a depth map. The depth map is obtain in ROS by my depth camera (theres no RGB component in it).
P.S. I have extracted this from a source in google.
I saw most of the QPixmap and QImage.format requires some colors in it (RGB/Mono/Grayscale) which does not fit in.
requires some colors in it (RGB/Mono/Grayscale) which does not fit in
Mono and greyscale do not have colors, so don't know what the problem is...
"QImage::Format_Mono 1 The image is stored using 1-bit per pixel. Bytes are packed with the most significant bit (MSB) first.".
"QImage::Format_Grayscale8 24 The image is stored using an 8-bit grayscale format. (added in Qt 5.5)
QImage::Format_Grayscale16 28 The image is stored using an 16-bit grayscale format. (added in Qt 5.13)"