Fixed blob detector parameters range.
authorAlexander Smorkalov <alexander.smorkalov@xperience.ai>
Mon, 26 Dec 2022 09:07:00 +0000 (12:07 +0300)
committerAlexander Smorkalov <alexander.smorkalov@xperience.ai>
Mon, 26 Dec 2022 12:02:24 +0000 (15:02 +0300)
modules/features2d/src/blobdetector.cpp

index 396521f..7cd49d8 100644 (file)
@@ -83,8 +83,8 @@ public:
       if (p.thresholdStep <= 0)
           CV_Error(Error::StsBadArg, "thresholdStep>0");
 
-      if (p.minThreshold > p.maxThreshold || p.minThreshold <= 0)
-          CV_Error(Error::StsBadArg, "0<minThreshold<=maxThreshold");
+      if (p.minThreshold > p.maxThreshold || p.minThreshold < 0)
+          CV_Error(Error::StsBadArg, "0<=minThreshold<=maxThreshold");
 
       if (p.minDistBetweenBlobs <=0 )
           CV_Error(Error::StsBadArg, "minDistBetweenBlobs>0");