文档介绍:Chapter 4 Mathematical Morphology
Mathematical morphology can extract image shape features,such as edges by operating with various shaped structuring elements.
Definition:
Structuring Element
Original Image
Processed Image
Structuring Element
Original Image
Processed Image With Dilated Pixels
Dilation can repair breaks
MATLAB:
A=imread('D:\'); %target image
imshow(A);
B=[0 1 0;1 1 1;0 1 0];
%structural element
A1=imdilate(A,B);
figure,imshow(A1);
image A
image A1
2. Erosion
Definition:
Structuring Element
Original Image
Processed Image With Eroded Pixels
Structuring Element
Original Image
Processed Image
MATLAB:
A=imread('D:\');
imshow(A);
S=strel('diamond',3);
% construct structuring
element
B=imerode(A,S);
figure,imshow(B)
image A
image B