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


Java MBFProjectionProcessor類代碼示例

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


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

示例1: render

import org.openimaj.image.processing.transform.MBFProjectionProcessor; //導入依賴的package包/類
@Override
public void render(final MBFImageRenderer renderer, final Matrix transform, final Rectangle rectangle) {
	if (this.toRender == null) {
		try {
			this.toRender = ImageUtilities.readMBF(VideoSIFT.class
					.getResource("/org/openimaj/demos/OpenIMAJ.png"));
		} catch (final IOException e) {
			System.err.println("Can't load image to render");
		}
		this.renderToBounds = TransformUtilities.makeTransform(this.toRender.getBounds(), rectangle);
	}

	final MBFProjectionProcessor mbfPP = new MBFProjectionProcessor();
	mbfPP.setMatrix(transform.times(this.renderToBounds));
	mbfPP.accumulate(this.toRender);
	mbfPP.performProjection(0, 0, renderer.getImage());

}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:19,代碼來源:VideoSIFT.java

示例2: render

import org.openimaj.image.processing.transform.MBFProjectionProcessor; //導入依賴的package包/類
@Override
public void render(final MBFImageRenderer renderer, final Matrix transform, final Rectangle rectangle) {
	if (this.toRender == null) {
		try {
			this.toRender = ImageUtilities.readMBF(VideoColourSIFT.class
					.getResource("/org/openimaj/demos/OpenIMAJ.png"));
		} catch (final IOException e) {
			System.err.println("Can't load image to render");
		}
		this.renderToBounds = TransformUtilities.makeTransform(this.toRender.getBounds(), rectangle);
	}

	final MBFProjectionProcessor mbfPP = new MBFProjectionProcessor();
	mbfPP.setMatrix(transform.times(this.renderToBounds));
	mbfPP.accumulate(this.toRender);
	mbfPP.performProjection(0, 0, renderer.getImage());

}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:19,代碼來源:VideoColourSIFT.java

示例3: getNextFrame

import org.openimaj.image.processing.transform.MBFProjectionProcessor; //導入依賴的package包/類
@Override
public MBFImage getNextFrame() {
	canvas.fill(RGBColour.BLACK);
	double timePerFrame = 1000 / getFPS();
	double frame = getTimeStamp() / timePerFrame;
	double angle = start + (step * frame);
	int midx = image.getWidth()/2;
	int midy = image.getHeight()/2;
	Matrix spin = TransformUtilities.rotationMatrixAboutPoint(angle, midx, midy);
	
	MBFProjectionProcessor pp = new MBFProjectionProcessor();
	pp.setMatrix(translate.times(spin));
	pp.accumulate(image);
	pp.performProjection(0, 0, canvas);
	this.lastFrame  = canvas;
	return canvas;
}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:18,代碼來源:SpinningImageVideo.java

示例4: beforeUpdate

import org.openimaj.image.processing.transform.MBFProjectionProcessor; //導入依賴的package包/類
@Override
public void beforeUpdate(MBFImage frame) {
	DisplayUtilities.displayName(frame, "video");
	if (renderer == null) {
		this.renderer = frame.createRenderer();

	}
	// this.renderer.drawShapeFilled(targetArea, RGBColour.RED);
	updatePolygon();
	final ProjectionProcessor<Float[], MBFImage> proc = new MBFProjectionProcessor();
	proc.setMatrix(captureToVideo);

	proc.accumulate(nextCaptureFrame);
	if (this.targetArea != null) {
		final Matrix transform = TransformUtilities.homographyMatrixNorm(pointList);
		proc.setMatrix(transform);
		proc.accumulate(frame.clone());
	}
	synchronized (this) {
		proc.performProjection(0, 0, frame);
	}
}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:23,代碼來源:VideoWithinVideo.java

示例5: beforeUpdate

import org.openimaj.image.processing.transform.MBFProjectionProcessor; //導入依賴的package包/類
@Override
public void beforeUpdate(final MBFImage frame) {
	if (this.transform != null) {
		final MBFImage bgCopy = this.mbfImage.clone();
		final MBFProjectionProcessor proj = new MBFProjectionProcessor();
		proj.setMatrix(this.transform);
		proj.accumulate(frame);
		proj.performProjection(0, 0, bgCopy);
		this.panel.setImage(this.bimg = ImageUtilities.createBufferedImageForDisplay(bgCopy, this.bimg));
	}
	else
		this.panel.setImage(this.bimg = ImageUtilities.createBufferedImageForDisplay(frame, this.bimg));
}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:14,代碼來源:VideoSlide.java


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