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. Missing image about my kinect-opencv Qt program
Forum Update on Monday, May 27th 2025

Missing image about my kinect-opencv Qt program

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 775 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.
  • G Offline
    G Offline
    GermanGerm
    wrote on 2 Nov 2016, 16:12 last edited by A Former User 11 Feb 2016, 19:01
    #1

    i've worked with at program using Opencv to show the image from Kinect v2 and Qt to build a ui.
    Then it comes out that cv::imshow() is working but Qimage process isn't.
    Can someone discuss the issue with me?
    Maybe it's not the correct way to use QTimer like this or just dont put while(1) in the slot function?

    my code on github:
    https://github.com/GermanGerm/kinect_screen_showing_with_opencv

    code reference from this link:
    https://www.youtube.com/watch?v=akAAAvGyLn0

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Nov 2016, 21:36 last edited by
      #2

      Hi and welcome to devnet,

      Putting an infinite loop like that in a slot will block the event loop thus freeze your application UI. You either need to do the grabbing from another thread or use a QTimer (watch out for the speed of the function).

      Note that OpenCV can also use Qt as UI backend.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VRonin
        wrote on 2 Nov 2016, 23:25 last edited by
        #3

        try calling QCoreApplication::processEvents(); inside your loop. if it solves your problem the the infinite loop is causing it

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        0

        1/3

        2 Nov 2016, 16:12

        • Login

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