本文整理匯總了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());
}
示例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(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);
}
}
示例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));
}