Package jjil.core

Examples of jjil.core.RgbImage


                      ErrorCodes.IMAGE_NOT_RGBIMAGE,
                      image.toString(),
                      null,
                      null);
        }
        RgbImage rgbImage = (RgbImage) image;
        int[] src = rgbImage.getData();
        int nWidth = rgbImage.getWidth();
        for (int i=0; i<rgbImage.getHeight(); i++) {
            for (int j=0; j<rgbImage.getWidth(); j++) {
                int nColorPixel = src[i*nWidth + j];
                int nRed = RgbVal.getR(nColorPixel);
                int nGreen = RgbVal.getG(nColorPixel);
                int nBlue = RgbVal.getB(nColorPixel);
                int nDiff = Math.abs(nRed - this.nR) +
View Full Code Here


                      ErrorCodes.IMAGE_NOT_RGBIMAGE,
                      imageInput.toString(),
                      null,
                      null);
        }
        RgbImage rgbInput = (RgbImage) imageInput;
        int[] rgbData = rgbInput.getData();
        for (int i=0; i<rgbInput.getWidth()*rgbInput.getHeight(); i++) {
            int nR = RgbVal.getR(rgbData[i]);
            int nG = RgbVal.getG(rgbData[i]);
            int nB = RgbVal.getB(rgbData[i]);
            int nMax, nMid, nMin;
            int nHueOffset;
View Full Code Here

                    ErrorCodes.IMAGE_NOT_RGBIMAGE,
                    image.toString(),
                    null,
                    null);
        }
        RgbImage rgb = (RgbImage) image;
        int[] rgbData = rgb.getData();
        Gray8Image gray = new Gray8Image(image.getWidth(), image.getHeight());
        byte[] grayData = gray.getData();
        for (int i=0; i<image.getWidth() * image.getHeight(); i++) {
            /* get individual r, g, and b values, unmasking them from the
             * ARGB word.
View Full Code Here

                  ErrorCodes.IMAGE_NOT_RGBIMAGE,
                  image.toString(),
                  null,
                  null);
        }
        RgbImage rgb = (RgbImage) image;
        int[] rgbData = rgb.getData();
        Gray8Image gray = new Gray8Image(image.getWidth(), image.getHeight());
        byte[] grayData = gray.getData();
        if (colorChosen.equals(RED)) {
            for (int i=0; i<image.getWidth() * image.getHeight(); i++) {
                /* get individual color value, unmasking it from the
View Full Code Here

                      ErrorCodes.IMAGE_SIZES_DIFFER,
                      imRed.toString(),
                      imGreen.toString(),
                      imBlue.toString());
        }
        RgbImage rgb = new RgbImage(imRed.getWidth(), imRed.getHeight());
        byte[] redData = imRed.getData();
        byte[] greenData = imGreen.getData();
        byte[] blueData = imBlue.getData();
        int[] rgbData = rgb.getData();
        for (int i=0; i<imRed.getWidth() * imRed.getHeight(); i++) {
            /* Convert from signed byte value to unsigned byte for storage
             * in the RGB image.
             */
            int redUnsigned = (redData[i]) - Byte.MIN_VALUE;
View Full Code Here

        this.grayWarp.push(this.selectGreen.getFront());
        Gray8OffsetImage warpedGreen = (Gray8OffsetImage) this.grayWarp.getFront();
        this.selectBlue.push(imageInput);
        this.grayWarp.push(this.selectBlue.getFront());
        Gray8OffsetImage warpedBlue = (Gray8OffsetImage) this.grayWarp.getFront();
        RgbImage rgb = Gray3Bands2Rgb.push(warpedRed, warpedGreen, warpedBlue);
        super.setOutput(new RgbOffsetImage(
                rgb,
                warpedRed.getXOffset(),
                warpedRed.getYOffset()));
    }
View Full Code Here

                    ErrorCodes.IMAGE_NOT_RGBIMAGE,
                    image.toString(),
                    null,
                    null);
        }
        RgbImage rgb = (RgbImage) image;
        int[] rgbData = rgb.getData();
        Gray8Image gray = new Gray8Image(image.getWidth(), image.getHeight());
        byte[] grayData = gray.getData();
        for (int i=0; i<image.getWidth() * image.getHeight(); i++) {
            /* get individual r, g, and b values, unmasking them from the
             * ARGB word.
View Full Code Here

                            "RgbMaskedImage",
                            null);
        }
        RgbMaskedImage rgbImage = (RgbMaskedImage) image;
        int[] src = rgbImage.getData();
        RgbImage rgbOutput = new RgbImage(rgbImage.getWidth(), rgbImage.getHeight());
        int[] dst = rgbOutput.getData();
        for (int i=0; i<rgbImage.getHeight(); i++) {
            for (int j=0; j<rgbImage.getWidth(); j++) {
                int nColorPixel = src[i*rgbImage.getWidth() + j];
                if (rgbImage.isMasked(i, j)) {
                    int nRed = RgbVal.getR(nColorPixel);
View Full Code Here

                      ErrorCodes.IMAGE_NOT_RGBIMAGE,
                      image.toString(),
                      null,
                      null);
        }
        RgbImage imageInput = (RgbImage) image;
        int[] rgb = imageInput.getData();
        for (int i=0; i<imageInput.getHeight() * imageInput.getWidth(); i++) {
            // the scaling has to be done on unsigned values.
            int nRed = RgbVal.getR(rgb[i]) - Byte.MIN_VALUE;
            int nGreen = RgbVal.getG(rgb[i]) - Byte.MIN_VALUE;
            int nBlue = RgbVal.getB(rgb[i]) - Byte.MIN_VALUE;
            // scale and convert back to signed byte values
View Full Code Here

                      ErrorCodes.IMAGE_NOT_RGBIMAGE,
                      imageInput.toString(),
                      null,
                      null);
        }
        RgbImage rgbInput = (RgbImage) imageInput;
        int [] rgbData = rgbInput.getData();
        Gray8Image grayOutput = new Gray8Image(
                rgbInput.getWidth(),
                rgbInput.getHeight());
        byte [] grayData = grayOutput.getData();
        for (int i=0; i<rgbInput.getHeight()*rgbInput.getWidth(); i++) {
            int nR = RgbVal.getR(rgbData[i]);
            int nG = RgbVal.getG(rgbData[i]);
            int nB = RgbVal.getB(rgbData[i]);
            int nMinVal = Integer.MAX_VALUE;
            for (int j=0; j<this.nRgbVecs.length; j++) {
View Full Code Here

TOP

Related Classes of jjil.core.RgbImage

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.