www.gusucode.com > images 案例代码 matlab源码程序 > images/DilateImageWithVerticalLineStructuringElementExample.m

    %% Dilate Image with Vertical Line Structuring Element
% 
%%
% Read a binary image into the workspace.
BW = imread('text.png');
%%
% Create a vertical line shaped structuring element.
se = strel('line',11,90);
%%
% Dilate the image with a vertical line structuring element and compare the
% results.
BW2 = imdilate(BW,se);
imshow(BW), title('Original')
figure, imshow(BW2), title('Dilated')