What units is the number in strel('disk', 22)?

1 次查看(过去 30 天)
dilated = imdilate(ImagetoDilate,strel('disk', 22));
I have this line in my code to dilate the image, but I was wondering what units the 22 is? It says it is the radius but is it measured in centimeters, percentage, pixels or something else?

采纳的回答

Walter Roberson
Walter Roberson 2019-9-16
编辑:Walter Roberson 2019-9-16
Pixels.
Or more correctly, memory locations, as the result is used in multiple contexts and makes no attempt to handle multiple color planes.
  1 个评论
Guillaume
Guillaume 2019-9-16
编辑:Guillaume 2019-9-16
You can easily look at the structuring element
>> s = strel('disk', 22)
s =
strel is a disk shaped structuring element with properties:
Neighborhood: [43×43 logical]
Dimensionality: 2
and you can see that the disk overlaps 43x43 pixels.
As for it being a disk:
>> imagesc(s.Neighborhood); colormap([0 0 0; 0.8 0.8 0.8]); axis('off')

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品


版本

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by