Skip to content
Browse files

grrrr blob edge cases again

  • Loading branch information...
1 parent 65c0116 commit 68e580f2ceb9f57ddd7509c3d87c5216786838ab Katherine Scott committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 SimpleCV/Features/
4 SimpleCV/Features/
@@ -85,8 +85,8 @@ def extractFromBinary(self,binaryImg,colorImg, minsize = 5, maxsize = -1,appx_le
# that sits on the edge of an image the whole thing explodes
# this check catches those bugs. -KAS
# Also I am submitting a bug report to Willow Garage - please bare with us.
- ptest = 510.0/(binaryImg.width*binaryImg.height) # val if two pixels are white
- if( test[0]<ptest and test[1]<ptest and test[2]<ptest):
+ ptest = (4*255.0)/(binaryImg.width*binaryImg.height) # val if two pixels are white
+ if( test[0]<=ptest and test[1]<=ptest and test[2]<=ptest):
return retVal
seq = cv.FindContours( binaryImg._getGrayscaleBitmap(), self.mMemStorage, cv.CV_RETR_TREE, cv.CV_CHAIN_APPROX_SIMPLE)

0 comments on commit 68e580f

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