Name

CreateSizeHistogram — calculates a histogram of blob sizes

Calling Sequence

[SizeHistogram, ListOfBins] = CreateSizeHistogram(BlobImage);

SizeHistogram = CreateSizeHistogram(BlobImage);

Parameters

BlobImage

2D matrix of type uint32 or int32

SizeHistogram

vector that contains the number of pixels for each blob in BlobImage

ListOfBins

vector that contains the bins of the size histogram, i. e. the object sizes

Description

This function calculates a histogram of blob sizes.

Examples

RGB = ReadImage('contrib\IPD-3.1\demos\teaset.png');

Image = RGB2Gray(RGB);

ThresholdImage = SegmentByThreshold(Image, 200);

BlobImage = SearchBlobs(ThresholdImage);

[SizeHistogram, ListOfBins] = CreateSizeHistogram(BlobImage);

figure(); plot(ListOfBins, SizeHistogram);

See Also

SearchBlobs, FilterBySize, CreateFeatureStruct, AnalyzeBlobs, CumulateSizeHistogram, CreatePixelIndexList