本文整理汇总了Python中Control.imagesMatrix方法的典型用法代码示例。如果您正苦于以下问题:Python Control.imagesMatrix方法的具体用法?Python Control.imagesMatrix怎么用?Python Control.imagesMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control.imagesMatrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: join
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imagesMatrix [as 别名]
recImgP = join(path, "reconstructionImages")
htmlPath = join(path, "objects")
html = Control.HTMLObjectsView(
Reducer,
path,
createOriginalViewer(origImgP, htmlPath, Reducer, QLSA),
createRepresentationViewer(repImgP, htmlPath, Reducer, np.ceil(np.sqrt(r))),
createReconstructionViewer(recImgP, htmlPath, Reducer, QLSA),
)
html.generate()
del html
del Reducer
I = "/home/jecamargom/tmp/datasets/faces"
M, Docs = Control.imagesMatrix(I, 361)
DocsP = [join(I, f) for f in Docs]
print "[DEBUG] Max number in ORL faces matrix", M.max()
print "[DEBUG] Matrix Dimensions : ", M.shape
p = "/home/jecamargom/tmp/experiments/faces1"
r = 50
# generateFactorization("QLSA",Control.QLSA,M,Docs,DocsP,p,r)
generateFactorization("QLSA2", Control.QLSA2, M, Docs, DocsP, p, r, True)
# generateFactorization("NMF",Control.NMF,M,Docs,DocsP,p,r)
# generateFactorization("VQ",Control.VQ,M,Docs,DocsP,p,r)
# generateFactorization("PCA",Control.PCA,M,Docs,DocsP,p,r)
p = "/home/jecamargom/tmp/experiments/faces2"
r = 25
示例2: range
# 需要导入模块: import Control [as 别名]
# 或者: from Control import imagesMatrix [as 别名]
import Control
I = '/home/tuareg/Documents/UNAL/7mo semestre/Machine Learning 2/TMP/datasets/ORLFull'
M,L = Control.imagesMatrix(I)
M = Control.quantumNormalize(M)
quantumImagesDirectory = '/home/tuareg/Documents/UNAL/7mo semestre/Machine Learning 2/TMP/datasets/ORLFullQuantumNormalized/'
imageGenerator = Control.imageViewGenerator(M.max(),M.min(),quantumImagesDirectory,quantumImagesDirectory,112,True)
for i in range(M.shape[1]):
imageGenerator.toImage(M[:,i],L[i])