Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

grrrr blob edge cases again

  • Loading branch information...
commit 68e580f2ceb9f57ddd7509c3d87c5216786838ab 1 parent 65c0116
Katherine Scott authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 SimpleCV/Features/BlobMaker.py
4 SimpleCV/Features/BlobMaker.py
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.