Beispiel #1
0
      @Override
      public void render(
          final MBFImageRenderer renderer, final Matrix transform, final Rectangle rectangle) {
        if (this.toRender == null) {
          this.toRender =
              new XuggleVideo(
                  VideoColourSIFT.class.getResource("/org/openimaj/demos/video/keyboardcat.flv"),
                  true);
          this.renderToBounds =
              TransformUtilities.makeTransform(
                  new Rectangle(0, 0, this.toRender.getWidth(), this.toRender.getHeight()),
                  rectangle);
        }

        final MBFProjectionProcessor mbfPP = new MBFProjectionProcessor();
        mbfPP.setMatrix(transform.times(this.renderToBounds));
        mbfPP.accumulate(this.toRender.getNextFrame());
        mbfPP.performProjection(0, 0, renderer.getImage());
      }
Beispiel #2
0
      @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());
      }