1 | initial version |
for a grayscale image this should work (works for me, I use openCV 3.0): Mat zeroMat = Mat::zeros(n_rows, n_cols, CV_8UC1); where n_rows and n_cols are the number of rows and colums (thus, int) respectively. if your image is not grayscale, change the last entry.
2 | No.2 Revision |
for a grayscale image this this should work (works for me, I use openCV 3.0):
3.0):
Mat zeroMat = Mat::zeros(n_rows, Mat.zeros(n_rows, n_cols, CV_8UC1);
CvType.CV_8UC1);
where n_rows and n_cols are the number of rows and colums (thus, int) respectively. if your image is not grayscale, change the last entry.