Package jjil.core

Examples of jjil.core.Gray8OffsetImage


        byte[] dataIn = this.imageInput.getData();
        // offset of first pixel of the subimage within the
        // larget image.
        int nHOffset = this.nXOffset * this.nHorizIndex;
        int nVOffset = this.nYOffset * this.nVertIndex;
        Gray8OffsetImage imageResult = (Gray8OffsetImage) super.imageOutput;
        imageResult.setXOffset(nHOffset);
        imageResult.setYOffset(nVOffset);
        byte[] dataOut = imageResult.getData();
        // don't access outside the image
        int nLimitY = Math.min(this.imageInput.getHeight() - nVOffset, this.nHeight);
        int nLimitX = Math.min(this.imageInput.getWidth() - nHOffset, this.nWidth);
        for (int i=0; i<nLimitY; i++) {
            int nVInLoc = i + nVOffset;
View Full Code Here


        this.nYOffset = -this.nMinY;
        if (this.nWarpOrder == Gray8AffineWarp.WARP_X_FIRST) {
            Gray8Image grayX = warpX((Gray8Image) image);
            //super.setOutput(new Gray8OffsetImage(grayX, this.nXOffset, this.nYOffset));
            Gray8Image grayY = warpY(grayX);
            super.setOutput(new Gray8OffsetImage(grayY, this.nXOffset, this.nYOffset));
        } else {
            Gray8Image grayY = warpY((Gray8Image) image);
            //super.setOutput(new Gray8OffsetImage(grayY, this.nXOffset, this.nYOffset));
            Gray8Image grayX = warpX(grayY);
            super.setOutput(new Gray8OffsetImage(grayX, this.nXOffset, this.nYOffset));
        }
    }
View Full Code Here

            mgsi.push(gmi);
            // now run Haar detection on each scaled image
            int nxLastFound = -hcc.getWidth();
            int nyLastFound = -hcc.getHeight();
            while (!mgsi.isEmpty()) {
                Gray8OffsetImage imSub = (Gray8OffsetImage) mgsi.getFront();
                // if we've found a feature recently we skip forward until
                // we're outside the masked region. There's no point rerunning
                // the detector
                if (imSub.getXOffset() > nxLastFound + hcc.getWidth() &&
                    imSub.getYOffset() > nyLastFound + hcc.getHeight()) {
                    if (hcc.eval(imSub)) {
                        // Found something.
                        nxLastFound = imSub.getXOffset();
                        nyLastFound = imSub.getYOffset();
                        // assign Byte.MAX_VALUE to the feature area so we don't
                        // search it again
                        Gray8Rect gr = new Gray8Rect(nxLastFound,
                                nyLastFound,
                                this.hcc.getWidth(),
View Full Code Here

TOP

Related Classes of jjil.core.Gray8OffsetImage

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.