Package javax.media.jai

Examples of javax.media.jai.KernelJAI


         * - Transforms into a lower gradient of 1 unit/(kernel size).
         * - Transforms into a gradient of (maximal range)/(kernel size).
         * - Applies an arbitrary correction factor for more convenient range in most cases.
         */
        final ParameterList block = parameters.parameters;
        final KernelJAI mask1 = (KernelJAI) block.getObjectParameter("Mask1");
        final KernelJAI mask2 = (KernelJAI) block.getObjectParameter("Mask2");
        final double size = (mask1.getWidth() + mask1.getHeight() +
                             mask2.getWidth() + mask2.getHeight()) / 4.0;
        double factor = getNormalizationFactor(mask1, mask2) / (size-1);
        if (factor>0 && !Double.isInfinite(factor)) {
            range = category.geophysics(true).getRange();
            final double minimum = range.getMinimum();
            final double maximum = range.getMaximum();
View Full Code Here


            // final ImageLayout layout= new ImageLayout();
            // layout.setColorModel(temp.getColorModel());
            // hints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT,layout));

            // error diffusion
            final KernelJAI ditherMask = KernelJAI.ERROR_FILTER_FLOYD_STEINBERG;
            final LookupTableJAI colorMap = ColorCube.BYTE_496;
            // (LookupTableJAI) temp.getProperty("JAI.LookupTable");
            image = ErrorDiffusionDescriptor.create(image, colorMap, ditherMask, hints);
        } else {
            // ordered dither
View Full Code Here

TOP

Related Classes of javax.media.jai.KernelJAI

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.