public void BlobSizeHistogramEmptyImage() { var gen = new BlobSizeHistogramTestImages(); Mat image = gen.EmptyImage(); var hist = new BlobSizeHistogramTask(); var blobCount = hist.GetBlobNumberInAreaRange(image, 0, 100); Assert.AreEqual(blobCount, 0); }
public void BlobSizeHistogramRandomBlobs() { var gen = new BlobSizeHistogramTestImages(); int correctNumber; int minArea = 100; int maxArea = 350; Mat image = gen.RandomBlobs(minArea, maxArea, out correctNumber); var hist = new BlobSizeHistogramTask(); var blobCount = hist.GetBlobNumberInAreaRange(image, minArea, maxArea); Assert.AreEqual(blobCount, correctNumber); }