更新时间:2023-02-26 14:49:20
实际上非常简单。这样的东西
It's actually pretty simple. Something like this
count = sum(im(:, :, 1) == 255 & im(:, :, 2) == 255 & im(:, :, 3) == 255);
将为您提供此类像素的计数。如果需要,用 find
替换 sum
以获取这些像素的索引。
will give you the count of such pixels. Replace sum
with find
to get the indices of those pixels if you need that.