필터 지우기
필터 지우기

How can I count the pixels in a black and white image?

조회 수: 2 (최근 30일)
Mara Pereira
Mara Pereira 2020년 7월 8일
답변: Image Analyst 2020년 7월 8일
How can I count the pixels in a black and white image?

답변 (1개)

Image Analyst
Image Analyst 2020년 7월 8일
Try this:
numberOfPixels = numel(binaryImage)
numberOfWhitePixels = nnz(binaryImage)
numberOfBlackPixels = numberOfPixels - numberOfWhitePixels

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by