Is there a way to compute the percentage of pixels in this image of a certain colour, whilst ignoring the (dark blue) background in the calculation?

1 次查看(过去 30 天)
Hi,
I'm trying to get the percentages of different coloured pixels in this image, but haven't found a way to either ignore the background or to ignore it in the percentage calculations. Any help would be appreciated!
otsuMinusBackground.jpg

采纳的回答

KSSV
KSSV 2020-2-11
If I is your image.....And your pixel value is n. Use:
idx = I==n ;
YOur idx will be a matrix with 1's and 0's...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by