Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. OpenCV Mat debugging helper
Qt 6.11 is out! See what's new in the release blog

OpenCV Mat debugging helper

Scheduled Pinned Locked Moved Qt Creator and other tools
debugopencvqtcreator
5 Posts 4 Posters 6.9k Views 2 Watching
  • 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.
  • D Offline
    D Offline
    dfarm
    wrote on last edited by
    #1

    Hello, I did some searching on the forum and couldn't find a solution for this. I'm trying to figure out how to setup qt-creator to be able to visualize cv::Mat structures from OpenCV. I looked at the source for the qttypes.py debugger helper and I saw one for QImage that looked promising. Before I tried to cargo cult that thing though I thought I would ask here if anyone has already done this (yet managed to evade Google) or has some tips. If it's helpful here is a nice SO question on converting between Mat & QImage. https://stackoverflow.com/questions/5026965/how-to-convert-an-opencv-cvmat-to-qimage -- actually even a link to better documentation for debugging helpers would be great. As far as I can tell there is one page of very high level description on Qt's site and 2 blog posts about it. As an example something I saw in the source but can't find any trace of anywhere is there seems to be facilities for using gnuplot (putPlotData in debugger)

    Oh as one more avenue, I did find a few gdb python visualizers for cv::Mat but every one of them deadlocked GDB when I tried it (they called out to Python's matplotlib).

    Thanks for any pointers!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Is this page what you found and read on the matter ?

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

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Is this page what you found and read on the matter ?

        D Offline
        D Offline
        dfarm
        wrote on last edited by dfarm
        #3

        @SGaist Yes, it's pretty sparse. In particular it doesn't address the image case at all.

        [EDIT: I complained about not being able to get even QImage helper to work, but resolved this by installing the qt4 libraries with debug info]

        Further googling led me to this post: http://forum.qt.io/topic/47370/debug-helper-for-visualizing-images but this person also failed. It seems like it should be possible it's just that nobody who has attempted has understood how debugging helpers work (myself included).

        D 1 Reply Last reply
        0
        • D dfarm

          @SGaist Yes, it's pretty sparse. In particular it doesn't address the image case at all.

          [EDIT: I complained about not being able to get even QImage helper to work, but resolved this by installing the qt4 libraries with debug info]

          Further googling led me to this post: http://forum.qt.io/topic/47370/debug-helper-for-visualizing-images but this person also failed. It seems like it should be possible it's just that nobody who has attempted has understood how debugging helpers work (myself included).

          D Offline
          D Offline
          DMoodie
          wrote on last edited by DMoodie
          #4

          Hi,

          So the issue with the debug visualizer that I was working on was the fact that QT never recognized the "Displayed" flag. :/
          If we can figure out why QT never even recognizes the flag then I can probably finish that visualizer.

          For now this is my solution:
          http://dtmoodie.blogspot.com/2015/02/getting-image-watch-like-debugging-in.html

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            Yanming
            wrote on last edited by
            #5

            Hi,

            If my cv::Mat variable is a 2 dimension matrix of a small size (<10*10), is it possible to show its elements in "locals and expressions" window? Is it easy or lots of work needed? Or there has already been some tools?

            Thanks a lot.
            Yanming

            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