Opening operation with a user defined NxN structuring element.
function call:
[out_img1]=vsg('OpenNxN',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 processed.
Description:
Opening is a combination of erosion and dilation operations that have
the effect of removing isolated spots in the image set A (in_img1)
that are smaller than the structuring element B and those
sections of the image set A narrower than B.
out_img1 – An image which
has dimensions the same as the input image. This is the result of
successive morphological erosion and dilation of the input image.
Example:
img = openimage('crown.jpg');
%color image
[out_img1]=vsg('Threshold',img,100);
figure;image(uint8(out_img1)); set(h,'Name','Threshold');
array = ones(3,3);
[out_img2]=vsg('OpenNxN',out_img1,array);
Notes:
1. For DICOM images, the function operates on all slices separately.
2. For RGB images, the function operates on all colour planes
separately.