Suppose one image has different objects of different sizes(50pixel,100pixels and 200pixel) in it. How can i Label only those objects which have 100pixels OR Greater than 100pixels & less than 200pixels.
I have labeled all objects in image by using AForge's Connected Components Labeling Method. But I don't know how to do same for specific size objects.
ConnectedComponentsLabeling Labeling = new ConnectedComponentsLabeling();
Bitmap labeledImage = Labeling.Apply(BinaryImage);
int Objects =Labeling.ObjectCount;
Solution
"// Applying Blob Filter
BlobsFiltering filter = new BlobsFiltering();
filter.CoupledSizeFiltering = true;
filter.MinHeight = 4;
filter.MinWidth = 4;
Bitmap FilterImage = filter.Apply(BinaryImage);
// Counting Ojects
ConnectedComponentsLabeling Labeling = new ConnectedComponentsLabeling();
Bitmap labeledImage = Labeling.Apply(FilterImage);
int TotalNumberofTeeth = Labeling.ObjectCount;