本文整理汇总了Python中Features.cutimage方法的典型用法代码示例。如果您正苦于以下问题:Python Features.cutimage方法的具体用法?Python Features.cutimage怎么用?Python Features.cutimage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Features
的用法示例。
在下文中一共展示了Features.cutimage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: extract_texels
# 需要导入模块: import Features [as 别名]
# 或者: from Features import cutimage [as 别名]
def extract_texels(trainset, border, distance_threshold, num_features, logger, pipe):
texels = []
tm = TimeManager(logger)
logger.info("sp> Extracting texels in different process")
for path in trainset:
img = Image.open(path)
data = np.array(img)
texels += Features.cutimage(data, border)
tm.tick()
logger.info('sp> {0} potential features'.format(len(texels)))
logger.info('sp> updating feature list')
features = []
features = Features.update_feature_list(features, texels, distance_threshold, num_features)
logger.info('sp> {0} features after update'.format(len(features)))
tm.tick()
logger.info("sp> Sending features to pipe")
pipe.send(features)
pipe.close()