OpenCV Mat debugging helper
-
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!
-
@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).
-
@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).
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