本文整理汇总了Python中SimpleCV.ImageClass.Image._copyNpwithMask方法的典型用法代码示例。如果您正苦于以下问题:Python Image._copyNpwithMask方法的具体用法?Python Image._copyNpwithMask怎么用?Python Image._copyNpwithMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleCV.ImageClass.Image
的用法示例。
在下文中一共展示了Image._copyNpwithMask方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mHullImg
# 需要导入模块: from SimpleCV.ImageClass import Image [as 别名]
# 或者: from SimpleCV.ImageClass.Image import _copyNpwithMask [as 别名]
def mHullImg(self):
tl = self.topLeftCorner()
retVal = np.zeros((self.height(), self.width(), 3), np.uint8)
npimg = self.image.getNumpy()[tl[1]:tl[1]+self.height(), tl[0]:tl[0]+self.width()]
mask = self.mHullMask.getGrayNumpy()
Image._copyNpwithMask(npimg, retVal, mask)
return Image(retVal)
示例2: mImg
# 需要导入模块: from SimpleCV.ImageClass import Image [as 别名]
# 或者: from SimpleCV.ImageClass.Image import _copyNpwithMask [as 别名]
def mImg(self):
#NOTE THAT THIS IS NOT PERFECT - ISLAND WITH A LAKE WITH AN ISLAND WITH A LAKE STUFF
retVal = np.zeros((self.height(), self.width(), 3), np.uint8)
tl = self.topLeftCorner()
npimg = self.image.getNumpy()[tl[1]:tl[1]+self.height(), tl[0]:tl[0]+self.width()]
mask = self.mMask.getGrayNumpy()
Image._copyNpwithMask(npimg, retVal, mask)
return Image(retVal)
示例3: getFullHullMaskedImage
# 需要导入模块: from SimpleCV.ImageClass import Image [as 别名]
# 或者: from SimpleCV.ImageClass.Image import _copyNpwithMask [as 别名]
def getFullHullMaskedImage(self):
"""
Get the full size image with the masked to the blob
"""
tl = self.topLeftCorner()
retVal = np.zeros((self.image.height, self.image.width, 3), np.uint8)
npimgcrop = self.image.getNumpy()[tl[1]:tl[1]+self.height(), tl[0]:tl[0]+self.width()]
mask = self.mHullMask.getGrayNumpy()
retValcrop = retVal[tl[1]:tl[1]+self.height(), tl[0]:tl[0]+self.width()]
Image._copyNpwithMask(npimgcrop, retValcrop, mask)
retVal[tl[1]:tl[1]+self.height(), tl[0]:tl[0]+self.width()] = retValcrop
return Image(retVal)