Search code examples
qtopencvqt-creatorqdebug

How to change data type of a cv::mat in Qt Qdebuger


I want see the stored data in my cv::mat data using Qdebuger. My problem is that the data-type of my cv::mat is uchar while the depth of my mat is cv_32f and I cannot change to a float type.

image of my problem


Solution

  • QT Creator has a special feature to give ability to visualize complex structures more user-friendly. It's called Debugging Helpers.

    You should write your own debugging helper for cv::mat type. Look qttypes.py for the samples.