Package jjil.core

Examples of jjil.core.Gray32Image


                    ErrorCodes.IMAGE_NOT_GRAY32IMAGE,
                    image.toString(),
                    null,
                    null);
        }
        Gray32Image g32 = (Gray32Image) image;
        float fSumHc = 0f;
        for (int i=0; i<this.classifier.length; i++) {
            HaarWeakClassifier hc = this.classifier[i];
            fSumHc += hc.eval(g32);
        }
View Full Code Here


                }
            }
            this.nWidth = nWidth;
            // form the cumulative sum of the image
            this.gcs.push(image);
            Gray32Image g32 = (Gray32Image) this.gcs.getFront();
            for (int i=0; i<this.hsc.length; i++) {
                this.hsc[i].setStdDev(stdDev);
                if (!this.hsc[i].eval(g32)) {
                    return false;
                }
View Full Code Here

        }
        super.setOutput(cxmResult);
    }
   
    private void invertPsf() throws jjil.core.Error {
        this.gPsfSq = new Gray32Image(this.cxmPsfInv.getWidth(), this.cxmPsfInv.getHeight());
        Complex cxPsf[] = this.cxmPsfInv.getData();
        int nData[] = this.gPsfSq.getData();
        for (int i=0; i<this.cxmPsfInv.getWidth() * this.cxmPsfInv.getHeight(); i++) {
            if (Math.abs(cxPsf[i].real()) > MathPlus.SCALE ||
                Math.abs(cxPsf[i].imag()) > MathPlus.SCALE) {
View Full Code Here

                    image.toString(),
                    null,
                    null);
        }
        Gray8Image gray = (Gray8Image) image;
        Gray32Image gray32 = new Gray32Image(image.getWidth(), image.getHeight());
        byte[] grayData = gray.getData();
        int[] gray32Data = gray32.getData();
        for (int i=0; i<gray.getWidth() * gray.getHeight(); i++) {
            /* Convert from signed byte value to unsigned byte for storage
             * in the 32-bit image.
             */
            int grayUnsigned = (grayData[i]) - Byte.MIN_VALUE;
View Full Code Here

                ErrorCodes.IMAGE_NOT_GRAY32IMAGE,
                image.toString(),
                null,
                null);
        }
        Gray32Image gray = (Gray32Image) image;
        int[] data = gray.getData();
        for (int i=0; i<data.length; i++) {
            data[i] = data[i] / this.nDivisor;
        }
        super.setOutput(image);
    }
View Full Code Here

                      this.toString(),
                      null);
        }
        Gray8Image input = (Gray8Image) image;
        /* horizontal shrink */
        Gray32Image horiz = shrinkHoriz(input);
        /* vertical shrink */
        Gray8Image result = shrinkVert(horiz);
        super.setOutput(result);
    }
View Full Code Here

     * @param input the input image
     * @return the shrunk image
     */
    private Gray32Image shrinkHoriz(Gray8Image input) {
        /* horizontal shrink */
        Gray32Image horiz = new Gray32Image(this.cWidth, input.getHeight());
        byte[] inData = input.getData();
        int[] outData = horiz.getData();
        int[] nPixelSum = new int[input.getHeight()];
        for (int i=0; i<input.getHeight(); i++) {
            nPixelSum[i] = 0;
        }
        int nPos = 0;
View Full Code Here

                    ErrorCodes.IMAGE_NOT_GRAY32IMAGE,
                    image.toString(),
                    null,
                    null);
        }
        Gray32Image g32 = (Gray32Image) image;
        int nSumHc = 0;
        for (int i=0; i<this.classifier.length; i++) {
            HaarWeakClassifier hc = this.classifier[i];
            nSumHc += hc.eval(g32);
        }
View Full Code Here

            }
            this.nWidth = nWidth;
            // form the cumulative sum of the image
            Gray8QmSum gcs = new Gray8QmSum(); // for forming cumulative sum
            gcs.push(image);
            Gray32Image g32 = (Gray32Image) gcs.getFront();
            for (int i=0; i<this.hsc.length; i++) {
                this.hsc[i].setStdDev(stdDev);
                if (!this.hsc[i].eval(g32)) {
                    return false;
                }
View Full Code Here

            image.toString(),
            null,
            null);

        }
        Gray32Image gray32 = (Gray32Image) image;
        Gray8Image gray8 = new Gray8Image(image.getWidth(), image.getHeight());
        int[] gray32Data = gray32.getData();
        byte[] gray8Data = gray8.getData();
        for (int i=0; i<gray32.getWidth() * gray32.getHeight(); i++) {
            /* Convert from 32-bit value to 8-bit value.
             */
             /* Assign 8-bit output */
            gray8Data[i] = (byte
                Math.min(Byte.MAX_VALUE,
View Full Code Here

TOP

Related Classes of jjil.core.Gray32Image

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.