@Override public void analyseImage(FImage image) { final FourierTransform ft = new FourierTransform(image, false); final FImage mag = ft.getMagnitude(); int count = 0; for (int y = 0; y < mag.height; y++) { for (int x = 0; x < mag.width; x++) { if (Math.abs(mag.pixels[y][x]) > threshold) count++; } } bpp = (double) count / (double) (mag.height * mag.width); DisplayUtilities.display(image, "" + bpp); }
@Override public void analyseImage(FImage image) { final FourierTransform ft = new FourierTransform(image, false); final FImage mag = ft.getMagnitude(); int count = 0; for (int y = 0; y < mag.height; y++) { for (int x = 0; x < mag.width; x++) { if (Math.abs(mag.pixels[y][x]) > threshold) count++; } } bpp = (double) count / (double) (mag.height * mag.width); DisplayUtilities.display(image, "" + bpp); }