DilationNxN

Dilation operation with a user defined NxN structuring element.

 

function call:

[out_img1]=vsg('DilationNxN',in_img1,conv_arr);

 

Arguments:

in_img1 mask image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.

conv_arr – an integer array specifying the mask with which the input image will be dilated.

 

Description:

Dilation is also referred to as filling and growing and is the expansion of an image set A by a SE B. It is formally viewed as the combination of the two sets using vector addition of the set elements and is equivalent to Minkowski set addition.

out_img1 – An image which has dimensions the same as the input image. This is an image which has been dilated.

 

Example:

img = openimage('crown.jpg');

[out_img1]=vsg('Threshold',img,100);

array = ones(5,5);

[out_img2]=vsg('DilationNxN',out_img1,array);

[out_img3]=vsg('DilationNxN',img,array);

h=figure;image(uint8(out_img2));set(h,'Name','Dilation – binary image');

h=figure;image(uint8(out_img3));set(h,'Name','Dilation - Grey scale image');

 

Notes:

1. For DICOM images, the function operates on all slices separately.

2. For RGB images, the function operates on all colour planes separately.

Home       Functions       Back