本文整理汇总了Python中utils.AttributeDict.downsample方法的典型用法代码示例。如果您正苦于以下问题:Python AttributeDict.downsample方法的具体用法?Python AttributeDict.downsample怎么用?Python AttributeDict.downsample使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.AttributeDict
的用法示例。
在下文中一共展示了AttributeDict.downsample方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: defaultParameters
# 需要导入模块: from utils import AttributeDict [as 别名]
# 或者: from utils.AttributeDict import downsample [as 别名]
def defaultParameters():
params = AttributeDict()
# switches
params.DO_PREPROCESSING = 1
params.DO_RESIZE = 0
params.DO_GRAYLEVEL = 1
params.DO_PATCHNORMALIZATION = 1 #!!!! 1
params.DO_SAVE_PREPROCESSED_IMG = 0
params.DO_DIFF_MATRIX = 1
params.DO_CONTRAST_ENHANCEMENT = 1
params.DO_FIND_MATCHES = 1
# parameters for preprocessing
params.downsample = AttributeDict()
params.downsample.size = [32, 64] # height, width
try:
params.downsample.method = Image.LANCZOS
except:
params.downsample.method = Image.ANTIALIAS
params.normalization = AttributeDict()
params.normalization.sideLength = 8
params.normalization.mode = 1
# parameters regarding the matching between images
params.matching = AttributeDict()
params.matching.ds = 10
params.matching.Rrecent=5
params.matching.vmin = 0.8
params.matching.vskip = 0.1
params.matching.vmax = 1.2
params.matching.Rwindow = 10
params.matching.save = 1
params.matching.load = 0 #1
# parameters for contrast enhancement on difference matrix
params.contrastEnhancement = AttributeDict()
params.contrastEnhancement.R = 10
# load old results or re-calculate? save results?
params.differenceMatrix = AttributeDict()
params.differenceMatrix.save = 1
params.differenceMatrix.load = 0 #1
params.contrastEnhanced = AttributeDict()
params.contrastEnhanced.save = 1
params.contrastEnhanced.load = 0 #1
# suffix appended on files containing the results
params.saveSuffix=''
return params