@Override public void analyseImage(IMAGE image) { if (fixedSize) { final double sc = Math.max((double) imageWidth / (double) image.getWidth(), (double) imageHeight / (double) image.getHeight()); final IMAGE resized = image.process(new ResizeProcessor((float) sc)); final IMAGE roi = resized.extractCenter(imageWidth, imageHeight); extractGist(roi); } else { if (gaborFilters == null || gaborFilters[0].width != image.getWidth() || gaborFilters[0].height != image.getHeight()) { gaborFilters = GaborFilters.createGaborJets(image.getWidth() + 2 * this.boundaryExtension, image.getHeight() + 2 * this.boundaryExtension, orientationsPerScale); } extractGist(image.clone()); // clone to stop side effects from // normalisation further down } }
@Override public void analyseImage(IMAGE image) { if (fixedSize) { final double sc = Math.max((double) imageWidth / (double) image.getWidth(), (double) imageHeight / (double) image.getHeight()); final IMAGE resized = image.process(new ResizeProcessor((float) sc)); final IMAGE roi = resized.extractCenter(imageWidth, imageHeight); extractGist(roi); } else { if (gaborFilters == null || gaborFilters[0].width != image.getWidth() || gaborFilters[0].height != image.getHeight()) { gaborFilters = GaborFilters.createGaborJets(image.getWidth() + 2 * this.boundaryExtension, image.getHeight() + 2 * this.boundaryExtension, orientationsPerScale); } extractGist(image.clone()); // clone to stop side effects from // normalisation further down } }