How can I count the pixels in a black and white image?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/329177/image.jpeg)
0 comentarios
Respuestas (1)
Image Analyst
el 8 de Jul. de 2020
Try this:
numberOfPixels = numel(binaryImage)
numberOfWhitePixels = nnz(binaryImage)
numberOfBlackPixels = numberOfPixels - numberOfWhitePixels
0 comentarios
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!