How to see the contents of cv::Mat in debugger?

asked 2020-01-28 08:11:22 -0600

h22 gravatar image

updated 2020-01-28 08:12:54 -0600

When debugging the C++ code, the IDE (I am using Clion) would show the contents of the ordinary array but it does not show the meaningful contents for cv::Mat. The contents of the raw uchar* buffer are shown instead. All I can get are dimensions.

image description

I know I can print the contents to console using cout << A <<endl construct, but this requires to make frequent temporary changes in the code. Maybe somebody knows solution or work around for this problem?

edit retag flag offensive close merge delete

Comments

1

Visual Studio has Image Watch for this purpose. Looks like this feature has been requested for Clion, but it does have high priority https://youtrack.jetbrains.com/issue/...

MaxD gravatar imageMaxD ( 2020-01-28 19:06:14 -0600 )edit