Ejemplo n.º 1
0
  private void doNotScaleLayers() {
    int N = pyramid.getNumLayers();

    for (int i = 0; i < N; i++) {
      BufferedImage b = ConvertBufferedImage.convertTo(pyramid.getLayer(i), null, true);
      addImage(b, String.format("%5.2f", pyramid.getScale(i)));
    }
  }
Ejemplo n.º 2
0
  private void scaleUpLayers() {
    T l = pyramid.getLayer(0);
    if (upscale == null) {
      interp = (InterpolatePixelS<T>) FactoryInterpolation.nearestNeighborPixelS(l.getClass());
      upscale = (T) l._createNew(l.width, l.height);
    } else {
      upscale.reshape(l.width, l.height);
    }

    int N = pyramid.getNumLayers();

    for (int i = 0; i < N; i++) {
      new FDistort(pyramid.getLayer(i), upscale).interpNN().scaleExt().apply();
      BufferedImage b = ConvertBufferedImage.convertTo(upscale, null, true);
      if (showScales) addImage(b, String.format("%5.2f", pyramid.getScale(i)));
      else addImage(b, String.format("%5.2f", pyramid.getSigma(i)));
    }
  }