Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. display a 16-bit grayscale images from a thermal camera in QT5
Forum Update on Monday, May 27th 2025

display a 16-bit grayscale images from a thermal camera in QT5

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 2.0k 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.
  • K Offline
    K Offline
    Khalaf90
    wrote on last edited by
    #1

    Hi Guys, I am struggling to display a 16-bit grayscale images from a FLIR tau 2 thermal camera in QT5. I tried different images' encoding and format but the best what I get is like in the right picture and how it should be like in the left one. A part of my code looks like this:
    I appreciate any help0_1555317294391_1.PNG 0_1555317302675_2.png

    jsulmJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to the forums.
      Maybe you could convert it to 8bit with opencv ?
      https://stackoverflow.com/questions/52188100/read-opencv-mat-16bit-to-qimage-8bit-greyscale
      The
      cv::normalize(I,I,0.,255.,cv::NORM_MINMAX,CV_8U);
      part.

      1 Reply Last reply
      6
      • K Khalaf90

        Hi Guys, I am struggling to display a 16-bit grayscale images from a FLIR tau 2 thermal camera in QT5. I tried different images' encoding and format but the best what I get is like in the right picture and how it should be like in the left one. A part of my code looks like this:
        I appreciate any help0_1555317294391_1.PNG 0_1555317302675_2.png

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

        @Khalaf90 You're trying to interpret the image data as 8bit grayscale while it is 16bit grayscale image (I guess that's why right picture looks stretched horizontally :-)). You need to convert it to 8bit first as @mrjj suggested.

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

        1 Reply Last reply
        4
        • K Offline
          K Offline
          Khalaf90
          wrote on last edited by
          #4

          Thank you guys for your answers , i have tried your suggestion and it worked ^_^

          1 Reply Last reply
          0

          • Login

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