Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

grrrr blob edge cases again

  • Loading branch information...
commit 68e580f2ceb9f57ddd7509c3d87c5216786838ab 1 parent 65c0116
authored July 13, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  SimpleCV/Features/BlobMaker.py
4  SimpleCV/Features/BlobMaker.py
@@ -85,8 +85,8 @@ def extractFromBinary(self,binaryImg,colorImg, minsize = 5, maxsize = -1,appx_le
85 85
         # that sits on the edge of an image the whole thing explodes
86 86
         # this check catches those bugs. -KAS
87 87
         # Also I am submitting a bug report to Willow Garage - please bare with us. 
88  
-        ptest = 510.0/(binaryImg.width*binaryImg.height) # val if two pixels are white
89  
-        if( test[0]<ptest and test[1]<ptest and test[2]<ptest):
  88
+        ptest = (4*255.0)/(binaryImg.width*binaryImg.height) # val if two pixels are white
  89
+        if( test[0]<=ptest and test[1]<=ptest and test[2]<=ptest):
90 90
             return retVal 
91 91
         
92 92
         seq = cv.FindContours( binaryImg._getGrayscaleBitmap(), self.mMemStorage, cv.CV_RETR_TREE, cv.CV_CHAIN_APPROX_SIMPLE)

0 notes on commit 68e580f

Please sign in to comment.
Something went wrong with that request. Please try again.