NESHOM NESHOM - 9 months ago 59
C# Question

Equivalent in EmguCV

What is equivalent of this code in emgucv:

cv::Mat marker = cv::Mat::zeros(im.size(), CV_8UC1);

This is in opencv now!

I couldn't find a wrapper for Mat!

Answer Source

As you can see at the top of the Documentation of the Matrix class here, you cannot initialize a matrix with explicit values. You can, however, initialize a matrix with a certain size and then set its values to zero by calling myMatrix.SetZero()