How do I view numbers in a cv::mat when debugging in visual studio [closed]

asked 2018-08-06 08:56:58 -0600

Dominic Hosler gravatar image

I would like to be able to see the numbers inside a cv::mat when using that matrix for image transformations, for example the camera and perspective transformation matrices that come out of the StereoCalibrate function. These are 34 or 33 size matrices and seeing the raw numbers is essential.

I would like something equivalent to "Image Watch 2017" which shows you the image represented by a cv::mat, but instead I just want to see the actual raw values. For other libraries, such as glm, the matrices are stored as arrays of arrays so I can actually go in the debugger and see the raw values, is there a plugin or something equivalent that allows me to do this when doing Visual Studio debugging using C++?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-20 11:53:33.667941

Comments

1

What*s wrong with Image Watch 2017? To watch raw values you just have to zoom in enough. An alternative way would be to assign cv::Mat to std::vector to get raw values.

matman gravatar imagematman ( 2018-08-06 09:09:28 -0600 )edit

Wow, I didn't know that! That is so useful. Thank you.

Dominic Hosler gravatar imageDominic Hosler ( 2018-08-06 15:20:37 -0600 )edit

i don't have VS any more, but i remember, that you could type something like:

(float*)(m.data), 12

in the debuggers expression window.

berak gravatar imageberak ( 2018-08-09 03:16:33 -0600 )edit