Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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.

I know I 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?<="" p="">

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

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.

I know I 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?<="" p=""> <<endl construct, but this requires to make frequent temporary changes in the code. Maybe somebody knows solution or work around for this problem?

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

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?