I'm trying to count the blobs of an image the resulted from canny edge detector filter of aforge.
In this code:
- Code: Select all
BlobCounter blobCounter = new BlobCounter(CannyImage);
blobCounter.MinWidth = (int)MinWidth.Value;
blobCounter.MinHeight = (int)MinHeight.Value;
blobCounter.FilterBlobs = true;
blobCounter.CoupledSizeFiltering = true;
Rectangle objects = blobCounter.GetObjectsRectangles();
When I change the size of min width and height, nothing changes. GetObjectsRectangles() always returns the same number of objects.
I tried this with CoupledSizeFiltering true and false and nothing changes. I changed the sizes of min width height from 2x2 to 200x200 , testing different values, nothing changes.
What am I doing wrong?