@Override @SuppressWarnings("unchecked") public void process(IMAGE image) { images = (IMAGE[]) Array.newInstance(image.getClass(), options.scales + options.extraScaleSteps + 1); // we want to each level to be separated by a constant factor // k=2^(1/scales) final float k = (float) Math.pow(2.0, 1.0 / options.scales); // image[0] of the octave is the input image images[0] = image; // the intial (input) image is considered to have sigma initialSigma. float prevSigma = options.initialSigma; for (int i = 1; i < options.scales + options.extraScaleSteps + 1; i++) { images[i] = images[i - 1].clone(); // compute the amount to increase from prevSigma to prevSigma*k final float increase = prevSigma * (float) Math.sqrt(k * k - 1.0); images[i].processInplace(options.createGaussianBlur(increase)); prevSigma *= k; } // if a processor is defined, apply it if (options.getOctaveProcessor() != null) options.getOctaveProcessor().process(this); }
@Override @SuppressWarnings("unchecked") public void process(IMAGE image) { images = (IMAGE[]) Array.newInstance(image.getClass(), options.scales + options.extraScaleSteps + 1); // we want to each level to be separated by a constant factor // k=2^(1/scales) final float k = (float) Math.pow(2.0, 1.0 / options.scales); // image[0] of the octave is the input image images[0] = image; // the intial (input) image is considered to have sigma initialSigma. float prevSigma = options.initialSigma; for (int i = 1; i < options.scales + options.extraScaleSteps + 1; i++) { images[i] = images[i - 1].clone(); // compute the amount to increase from prevSigma to prevSigma*k final float increase = prevSigma * (float) Math.sqrt(k * k - 1.0); images[i].processInplace(options.createGaussianBlur(increase)); prevSigma *= k; } // if a processor is defined, apply it if (options.getOctaveProcessor() != null) options.getOctaveProcessor().process(this); }
image.processInplace(this.options.createGaussianBlur(sigma));
image.processInplace(this.options.createGaussianBlur(sigma));