Multiscale dilation:structure unit does not change after imdilate by itself. What the multiscale dilation meaning?

1 view (last 30 days)
g=[0 1 0;0 1 0;0 1 0];
n=3;
ng=g;
for i=1:n
ng=imdilate(ng,g)
end
  1 Comment
DGM
DGM on 27 Nov 2021
The strel has a width of 1px. Dilation with a 1px strel does no change.
A = zeros(5);
A(3,3) = 1
A = 5×5
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
imdilate(A,1)
ans = 5×5
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0

Sign in to comment.

Answers (1)

Prachi Kulkarni
Prachi Kulkarni on 1 Dec 2021
Edited: Prachi Kulkarni on 2 Dec 2021
Hi,
As per the definition of dilation described at the end of the documentation on imdilate, the structural element g when operated on the matrix ng should not lead to any change in the matrix ng.
This is not generally true. It is applicable to your particular definitions of the variables g and ng.
  2 Comments
DGM
DGM on 2 Dec 2021
I'm sorry. I trust you know that. I just wanted to make sure that OP or a future reader didn't misinterpret it that way, and used the opportunity to elaborate on my own prior comments.

Sign in to comment.

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!