Assigns a unique value to each blob in the input image in order of area.
function call:
[out_img1]=vsg('LabelByArea',in_img1);
Arguments:
in_img1
input image, 3 channel RGB, 1 channel greyscale or binary image, or
DICOM image.
Description:
out_img1
- An image which has dimensions the same as the input image. The output
image displays individual blobs which have unique greyscale values for
each blob. The values increase according to the size of the blobs, i.e.
the larger blobs will have larger greyscale values
Example:
img = imread('crown.jpg');
figure;image(img);
[out_img1]=vsg('Threshold',img,100);
[out_img1]=vsg('LabelByArea',out_img1);
h=figure;imagesc(out_img1(:,:,1));set(h,'Name','Label By Area
Image');
Notes:
1. For DICOM images, the function operates on each slice separately.