# [Ask Help] - Find Result Erode/Erosion on Matrix

Anyone could help me to find Erode/Erosion on this matrix?
Thanks

``````a = [  1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0;
1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 0;
1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0;
0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 0 0;
0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1;
0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1;
1 0 0 0 1 0 1 1 0 1 1 1 0 1 1 1 0 1 0 1;
1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 0 0 1;
1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 1 0;
0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1 0 0;
0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 1 1 0;
0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 1 0;
1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0;
1 1 1 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 0;
0 1 1 1 0 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1;
0 1 1 0 0 1 0 0 1 1 1 0 1 1 1 0 0 1 1 1;
0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1;
1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0;
1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0;
1 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0];
``````
``````b = [  1 1 1;
0 1 0;
1 1 1];
``````

What does “Erode/Erosion on this matrix” mean?

If you can outline what algorithm that is we can help guide you to write the code you need.

Install `scikit-image`, then do

``````from skimage.morphology import erosion
result = erosion(a, b)
``````
1 Like