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 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
RGB = ReadImage('contrib\IPD-5.0\demos\teaset.png');
Image = RGB2Gray(RGB);
ThresholdImage = SegmentByThreshold(Image, 200);
BlobImage = SearchBlobs(ThresholdImage);
[SizeHistogram, ListOfBins] = CreateSizeHistogram(BlobImage);
figure(); plot(ListOfBins, SizeHistogram);