Permalink
Browse files

Merge pull request #622 from sightmachine/SCV-1

Scv 1
  • Loading branch information...
2 parents 05d4f94 + b9656f6 commit 7372a0c58eead9c3228315d65ae1903e4b8eb3f1 @xamox xamox committed Mar 5, 2014
Showing with 15 additions and 0 deletions.
  1. +15 −0 SimpleCV/Features/Blob.py
View
@@ -1101,6 +1101,21 @@ def match(self, otherblob):
otherM = otherSigns * otherLogs
return np.sum(abs((1/ myM - 1/ otherM)))
+
+ def getMaskedImage(self):
+ """
+ Get the blob size image with the masked blob
+ """
+ retVal = cv.CreateImage((self.width(),self .height()),cv.IPL_DEPTH_8U,3)
+ cv.Zero(retVal)
+ bmp = self.image.getBitmap()
+ mask = self.mMask.getBitmap()
+ tl = self.topLeftCorner()
+ cv.SetImageROI(bmp,(tl[0],tl[1], self.width(),self.height()))
+ cv.Copy(bmp,retVal,mask)
+ cv.ResetImageROI(bmp)
+ return Image(retVal)
+
def getFullMaskedImage(self):
"""

0 comments on commit 7372a0c

Please sign in to comment.