本文整理匯總了Java中org.openimaj.image.processing.transform.MBFProjectionProcessor.accumulate方法的典型用法代碼示例。如果您正苦於以下問題:Java MBFProjectionProcessor.accumulate方法的具體用法?Java MBFProjectionProcessor.accumulate怎麽用?Java MBFProjectionProcessor.accumulate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.openimaj.image.processing.transform.MBFProjectionProcessor
的用法示例。
在下文中一共展示了MBFProjectionProcessor.accumulate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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());
}
示例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());
}
示例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;
}
示例4: 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));
}