Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Displat Depth image in PyQT4

Displat Depth image in PyQT4

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for pythonpython
6 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lucien
    wrote on last edited by
    #1

    Hi,

    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?

    jsulmJ 1 Reply Last reply
    0
    • L Lucien

      Hi,

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Lucien said in Displat Depth image in PyQT4:

      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).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Lucien said in Displat Depth image in PyQT4:

        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).

        L Offline
        L Offline
        Lucien
        wrote on last edited by
        #3

        @jsulm
        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.

        jsulmJ 1 Reply Last reply
        0
        • L Lucien

          @jsulm
          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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by jsulm
          #4

          @Lucien said in Displat Depth image in PyQT4:

          what I want to do is to display a 2D depth map on PyQT

          You can show pictures in a QLabel:

          • https://doc.qt.io/qt-5/qlabel.html#setPicture
          • https://doc.qt.io/qt-5/qlabel.html#pixmap-prop

          Or you can paint the picture on a widget in its https://doc.qt.io/qt-5/qwidget.html#paintEvent

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • L Offline
            L Offline
            Lucien
            wrote on last edited by
            #5

            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). jqvqoyG.png
            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.

            jsulmJ 1 Reply Last reply
            0
            • L Lucien

              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). jqvqoyG.png
              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.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Lucien said in Displat Depth image in PyQT4:

              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)"

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved