<< CreatePixelIndexList IPD - Image Processing Design CreateStructureElement >>

IPD - Image Processing Design >> IPD - Image Processing Design > CreateSizeHistogram

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 blobs that have a number of pixels

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

global IPD_PATH;

RGB = ReadImage(IPD_PATH + 'demos\teaset.png');

Image = RGB2Gray(RGB);

ThresholdImage = SegmentByThreshold(Image, 200);

BlobImage = SearchBlobs(ThresholdImage);

[SizeHistogram, ListOfBins] = CreateSizeHistogram(BlobImage);

figure(); plot(ListOfBins, SizeHistogram);

See Also

<< CreatePixelIndexList IPD - Image Processing Design CreateStructureElement >>