Changing black pixels to white.

3 次查看(过去 30 天)
How can I keep the small black pixels and change the large lump of black pixels to white?

采纳的回答

Walter Roberson
Walter Roberson 2017-10-22
inverted = ~YourBWImae; %now black is 1, white is 0
Now you can do bwareafilt() on inverted, telling to keep only the groups that are sufficiently small for your purpose. Then after that, invert the result of that so that black goes back to being represented by 0.
  1 个评论
Selina Loh
Selina Loh 2017-10-22
But if the larger black pixels are not constant, can i not manually key in the area of the bwareafilt()?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by