Morphological operations

Images to be processed. (Solid square, Triangle, Hollow square, Cross / Plus sign)

//Strels
one= [1 1;1 1];
two= [1 1];
three= [1 ; 1];
four= [1 0 1 ; 0 1 0 ;1 0 1];
five = [0 1; 1 0];

Solid Square

Dilation

Erosion

Triangle

Dilation

Erosion

Hollow Square

Dilation

Erosion

Cross


Dilation

Erosion

Effect of 'skeleton' command on the images

Effect of 'thin' command on the images

— to be continued