採用された回答

Turlough Hughes
Turlough Hughes 2019 年 12 月 15 日

1 投票

Let's say you have a binary image B. You can get the number of black pixels by:
numBlack=nnz(~B);
and the number of white pixels by:
numWhite=nnz(B);

2 件のコメント

Turlough Hughes
Turlough Hughes 2019 年 12 月 15 日
Fatema, did this help/work?
fatema ali
fatema ali 2019 年 12 月 15 日
Yes it did, thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Convert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by