CountBlobs

Count the number of white bobs in a binary image (Range 0-255).

 

function call:

[num1]=vsg('CountBlobs',in_img1);

 

Arguments:

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

 

Description:

The num1 – returns an integer with the number of white blobs.

 

Example:

img = openimage('crown.jpg');

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

[num1]=vsg('CountBlobs',out_img1)

num1 = 26

 

Notes:

Ensure that binary images have a range {0,255}. For DICOM images, the number of blobs on the first slice is returned.
Home       Functions       Back