Reconstruction by dilation.
function call:
[out_img1,out_img2]=vsg('ReconByDil',in_img1,in_img2,connected);
Arguments:
in_img1 mask image, 3 channel
RGB, 1 channel greyscale or binary image, or DICOM image.
in_img2 seed image, 3 channel
RGB, 1 channel greyscale or binary image, or DICOM image.
connected – an integer
specifying whether 4 or 8 connected morphological operations should be
carried out.
Description:
out_img1 – An image which
has dimensions the same as the input image. This is the reconstructed
image.
out_img2 – An image which
has dimensions the same as the input image. This is the remainder of the
input mask image less the reconstructed regions.
Example:
img1=openimage('bio_sample.gif');
img1 = vsg('Inverse',img1);
h=figure;image(uint8(img1));set(h,'Name','Input Image');
img2 = img1;
img2(2:size(img1,1)-1,2:size(img1,2)-1,:)=0;
h=figure;image(uint8(img2));set(h,'Name','Second Input');
[out_img1,out_img2]=vsg('ReconByDil',img1,img2,connected);
h=figure;image(uint8(out_img1));set(h,'Name','Reconstruction
by Dilation');
h=figure;image(uint8(out_img2));set(h,'Name','Removal of
white region touching the boundary');
Notes:
1. For DICOM images, the function operates on all slices separately.
2. For RGB images, the function operates on all colour planes
separately.
3. All input images should be binary with a range of {0,255} as it is
white regions that are being dilated and it is a white region that
should be used as the mask.