smttsp
smttsp

Reputation: 4191

Is there a way to check the data in a matrix in opencv c++

I'm programming on Visual Studio c++ using OpenCV library for a project in Windows 7. I'm dealing with a lot of matrices of different types: uchar, float, double, Vec3d, Vec3b etc.

When I want to print out a value of an image, I stop the run, write the following line, cout << (int)mat.at<Veb3b>(i,j)[k];, and run from the beginning which is quite time consuming. In debug mode, I don't see the values of matrices, maybe the first index depending on the type. In Matlab, you can see the values, play with them on run time. (I'm fine with just seeing the values inside a matrix)

I'm wondering if there is a way to see the values on runtime using some external tool maybe. Many genius people have been working on OpenCV, some of them should have thought of it.

So, does anybody know about such a tool? I couldn't find anything related.

Upvotes: 1

Views: 83

Answers (1)

kmdreko
kmdreko

Reputation: 60062

I'd recommend the Image Watch extension from Microsoft (link).

It has built-in support for OpenCV datatypes. Better for image data, though using it for regular matrices works well too. Can break at any point and view data in global or local variables and can even do some simple filtering on the data displayed. You can zoom in to view individual elements. Also supports exporting directly from the debugger.

Upvotes: 2

Related Questions