Why disk structuring element of disk is 4? It's usually 3 or 21

4 ビュー (過去 30 日間)
Hoang
Hoang 2022 年 7 月 20 日
コメント済み: Hoang 2022 年 7 月 20 日

回答 (1 件)

DGM
DGM 2022 年 7 月 20 日
編集済み: DGM 2022 年 7 月 20 日
The size of the structuring element can be whatever is suitable for the task at hand. That's why it's user-specified. While strel() accepts this parameter as an integer-valued radius, bear in mind that the actual structuring element will always have odd diameter. In that sense, a radius of 4 shouldn't seem strange in that it's even. The array size is still odd.
st = strel('disk',4);
st.Neighborhood
ans = 7×7 logical array
0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 0
  4 件のコメント
Hoang
Hoang 2022 年 7 月 20 日
I try st.Neighborhood. It says "No appropriate method, property, or field 'Neighborhood' for class 'strel'."
Hoang
Hoang 2022 年 7 月 20 日
Oh never mind. I did it. Thanks for your help

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by