what does bwareaopen do?
显示 更早的评论
I understand, bwareaopen(BW, P) means, the function removes pixels from BW matrix less than 'P' pixels and the default conn is 4 which means
conn=4 means
- X -
X 0 X
- X -
conn=8 means
X X X
X 0 X
X X X
but for example
A = 0 1 0 0 1 0
0 1 1 0 1 0
0 1 0 0 1 0
0 1 0 0 0 0
0 1 1 0 0 0
0 1 0 0 0 0
B=bwareaopen(A,4) gives
B = 0 1 0 0 0 0
0 1 1 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
0 1 1 0 0 0
0 1 0 0 0 0
that means A(1:3,5) which are ones are deleted -- pixels lesser than 4 are deleted.
then what is the significant of "conn" = 4?? even if the pixels are not connected with neighborhood 4, they are deleted. Why?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Object Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!