本文整理匯總了Python中utils.AttributeDict.DO_SAVE_PREPROCESSED_IMG方法的典型用法代碼示例。如果您正苦於以下問題:Python AttributeDict.DO_SAVE_PREPROCESSED_IMG方法的具體用法?Python AttributeDict.DO_SAVE_PREPROCESSED_IMG怎麽用?Python AttributeDict.DO_SAVE_PREPROCESSED_IMG使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類utils.AttributeDict
的用法示例。
在下文中一共展示了AttributeDict.DO_SAVE_PREPROCESSED_IMG方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: defaultParameters
# 需要導入模塊: from utils import AttributeDict [as 別名]
# 或者: from utils.AttributeDict import DO_SAVE_PREPROCESSED_IMG [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