Extract matrix from strel matlab

I am trying to use the strel function from matlab and get its value in a matrix. 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, I get an error. Is there a way that I can simply extract the matrix part of this object? Please help me.

+4
source share
1 answer

Use the function of the STREL object of the getnhood () object:

 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 
+9
source

Source: https://habr.com/ru/post/1499883/


All Articles