|
I want to calculate the number of black pixels. And this is my test code. And this is the result. I don't know how can I receive the pixel values in integer. |
Answered by
dlemstra
May 11, 2020
Replies: 2 comments 3 replies
|
Can you share the original tiff image? |
1 reply
|
For this particular image you could use the using (var image = new MagickImage("test.tif"))
{
var colors = image.Histogram();
var blackPixelCount = colors[MagickColors.Black];
} |
2 replies
Answer selected by
sihj2002
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



For this particular image you could use the
Histogrammethod ofMagickImage: