Package jjil.algorithm

Examples of jjil.algorithm.Gray8Shrink


            // shrink the input image
            int nTargetWidth = (int) (imGray.getWidth() / fScale);
            int nTargetHeight = (int) (imGray.getHeight() / fScale);
            int nStepHoriz = Math.max(1, nTargetWidth / this.nStep);
            int nStepVert = Math.max(1, nTargetHeight / this.nStep);
            Gray8Shrink gs = new Gray8Shrink(nTargetWidth, nTargetHeight);
            gs.push(imGray);
            Gray8Image imShrunk = (Gray8Image) gs.getFront();
            for (int i=0; i<imShrunk.getWidth()-this.hcc.getWidth(); i+=nStepHoriz) {
                // compute left coordinate in original image
                int nXPos = (i * imGray.getWidth()) / imShrunk.getWidth();
                for (int j=0; j<imShrunk.getHeight()-this.hcc.getHeight(); j+=nStepVert) {
                    // compute top coordinate of in original image
View Full Code Here

TOP

Related Classes of jjil.algorithm.Gray8Shrink

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.