Package com.alkacon.simapi.filter.buffered

Examples of com.alkacon.simapi.filter.buffered.GaussianFilter


            double factor = ((1 / widthScale) + (1 / heightScale)) / 2.0;
            int average = (image.getWidth() + image.getHeight()) / 2;
            if (((factor < 10.0) && (average < 1000))) {
                // image is quite small and suitable factor - use gaussian blur
                GaussianFilter gauss = new GaussianFilter();
                double radius = Math.sqrt(1.5 * factor);
                gauss.setRadius((float)radius);
                image = gauss.filter(image, null);
            } else {
                // image is rather large, use much faster box blur
                double root = Math.sqrt(0.75 * factor);
                int radius;
                if ((factor < 3.5) || (pixel > m_renderSettings.getMaximumBlurSize())) {
View Full Code Here


            double factor = ((image.getWidth() / (widthScale * image.getWidth())) + (image.getHeight() / (heightScale * image.getHeight()))) / 2.0;
            int average = (image.getWidth() + image.getHeight()) / 2;
            if (((factor < 5.0) && (average < 1000))) {
                // image is quite small and suitable factor - use gaussian blur
                GaussianFilter gauss = new GaussianFilter();
                double radius = Math.sqrt(2.0 * factor);
                gauss.setRadius((float)radius);
                image = gauss.filter(image, null);
            } else {
                // image is rather large, use much faster box blur
                double root = Math.sqrt(factor);
                int radius;
                if ((factor < 3.5) || (pixel > m_renderSettings.getMaximumBlurSize())) {
View Full Code Here

            // (actually close to 0.5 it also looks jagged, so we use 0.575 instead)
            // however, if the image is to big, "out of memory" issues may occur
            int average = (width + height) / 2;
            if ((factor < 5.0) && (average < 900)) {
                // image is quite small and suitable factor - use gaussian blur
                GaussianFilter gauss = new GaussianFilter();
                double radius = Math.sqrt(2.0 * factor);
                gauss.setRadius((float)radius);
                image = gauss.filter(image, null);
            } else {
                // image is rather large, use much faster box blur
                double root = Math.sqrt(factor);
                int radius;
                if (factor < 2.5) {
View Full Code Here

TOP

Related Classes of com.alkacon.simapi.filter.buffered.GaussianFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.