Mat parameters explained [closed]
Mat object while printing in the string format as well as the values I have seen. But I would like to know what does this Scalar
in Mat signifies for.
If we look in this line of code : Mat source = new Mat(1, 1, CvType.CV_8U, new Scalar(3));
What does new Scalar(3) signifies for?
I know for black image we put it as 0. So is the value here signifying 0-255 colors?
CV_8U is an unsigned char (0, 1, 2 ...255) and Scalar(3) all pixels values set to 3. In your example Mat objet is one row and one column so only one pixel set to 3. Mat object can be used for image, matrix ,feature...
@LeBerger So what if we set it as Scalar(0). What is that value actually, 0 or 3 in Scalar that we are passing?
It C++ but I think it could help you
results
Scalar::all means all channels
"What is that value actually, 0 or 3 in Scalar that we are passing?" I'm not sure to understand
0 means black but if Mat is a histogram it means 0 occurence of this level