I am trying to use the strel function from matlab, and get its matrix value alone. When I define a strel object, as follows,
    SE = strel('disk',2);
I get the following
     SE
     SE =
       Flat STREL object containing 13 neighbors.
     Neighborhood:
       0     0     1     0     0
       0     1     1     1     0
       1     1     1     1     1
       0     1     1     1     0
       0     0     1     0     0
But when I try to use it as a matrix, am getting error. Is there a way where I can just extract the matrix part of this object? Please help me.
Use the STREL object's getnhood() function:
SE.getnhood()
ans = 
       0     0     1     0     0
       0     1     1     1     0
       1     1     1     1     1
       0     1     1     1     0
       0     0     1     0     0
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With