Remove larger connected components based on pixels
显示 更早的评论
bwareaopen(bw,p) can delete pixels of connected components below p pixels. I want to delete the connected components above p pixel.
Say, if a connected component has 19 pixel, & we set p =20, bwareaopen() can delete that component. But, I need to delete connected component that has ,say 51 pixels in it. A function to remove larger connected components (above the threshold "p").
采纳的回答
更多回答(1 个)
Eric Lin
2015-6-15
0 个投票
This answer provides a nice solution to your question.
Basically, to delete components greater than a threshold, use a logical complement and AND operation to mask out the larger components.
类别
在 帮助中心 和 File Exchange 中查找有关 Region and Image Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!