extract only white pixels from an image

How can I extract mean and variance of only white pixels of an image?

回答 (1 件)

Image Analyst
Image Analyst 2019 年 12 月 28 日
編集済み: Image Analyst 2019 年 12 月 28 日

0 投票

What value do you consider "white"? Let's say it's 230. Then you can get a binary image
binaryImage = grayImage >= 230;
Now, exactly what does "extract" mean to you? You want to consider all the gray values in the binary image? If so do
maskMean = mean(grayImage(binaryImage));
maskSD = std(grayImage(binaryImage));
maskVar = var(grayImage(binaryImage));

1 件のコメント

Mary Baratzadeh
Mary Baratzadeh 2019 年 12 月 30 日
excuse me, my mean is calculate the average white pixels of an image

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

カテゴリ

質問済み:

2019 年 12 月 28 日

コメント済み:

2019 年 12 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by