當前位置: 首頁>>代碼示例>>Java>>正文


Java EigenImages類代碼示例

本文整理匯總了Java中org.openimaj.image.model.EigenImages的典型用法代碼示例。如果您正苦於以下問題:Java EigenImages類的具體用法?Java EigenImages怎麽用?Java EigenImages使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EigenImages類屬於org.openimaj.image.model包,在下文中一共展示了EigenImages類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getComponent

import org.openimaj.image.model.EigenImages; //導入依賴的package包/類
@Override
public Component getComponent(int width, int height) throws IOException {
	final VFSGroupDataset<FImage> dataset = FaceDatasetProvider.getDataset();

	final EigenImages eigen = EigenFaceApproximationDemo.loadEigen(dataset, "eigenbasis.bin");

	final JPanel outer = new JPanel();
	outer.setOpaque(false);
	outer.setPreferredSize(new Dimension(width, height));
	outer.setLayout(new GridBagLayout());

	final JPanel base = new JPanel();
	base.setOpaque(false);
	base.setPreferredSize(new Dimension(width, height - 50));
	base.setLayout(new FlowLayout());

	for (int i = 0; i < 60; i++) {
		final FImage img = eigen.visualisePC(i);
		final ImageComponent ic = new ImageComponent(true, false);
		ic.setAllowPanning(false);
		ic.setAllowZoom(false);
		ic.setShowPixelColours(false);
		ic.setShowXYPosition(false);
		ic.setImage(ImageUtilities.createBufferedImageForDisplay(img));
		base.add(ic);
	}
	outer.add(base);

	return outer;
}
 
開發者ID:jonhare,項目名稱:COMP3005,代碼行數:31,代碼來源:FacePrincipleComponentsDemo.java

示例2: Extractor

import org.openimaj.image.model.EigenImages; //導入依賴的package包/類
/**
 * Construct with the requested number of components (the number of PCs
 * to keep) and a face aligner. The principal components must be learned
 * by calling {@link #train(List)}.
 * 
 * @param numComponents
 *            the number of principal components to keep.
 * @param aligner
 *            the face aligner
 */
public Extractor(int numComponents, FaceAligner<T> aligner) {
	this(new EigenImages(numComponents), aligner);
}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:14,代碼來源:EigenFaceFeature.java


注:本文中的org.openimaj.image.model.EigenImages類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。