MSER: all test passed.
1. if a component's variation is a global minimum than it should be a local minimum 2. for the small image with invert and blur, the MSERs number should be 20
This commit is contained in:
@@ -59,11 +59,11 @@ class mser_test(NewOpenCVTests):
|
||||
if blur:
|
||||
src = cv2.GaussianBlur(src, (5, 5), 1.5, 1.5)
|
||||
minRegs = 7 if use_big_image else 2
|
||||
maxRegs = 1000 if use_big_image else 15
|
||||
maxRegs = 1000 if use_big_image else 20
|
||||
if binarize and (thresh == 0 or thresh == 255):
|
||||
minRegs = maxRegs = 0
|
||||
msers, boxes = mserExtractor.detectRegions(src)
|
||||
nmsers = len(msers)
|
||||
self.assertEqual(nmsers, len(boxes))
|
||||
self.assertLessEqual(minRegs, nmsers)
|
||||
self.assertGreaterEqual(maxRegs, nmsers)
|
||||
self.assertGreaterEqual(maxRegs, nmsers)
|
||||
|
||||
Reference in New Issue
Block a user