Package jjil.core

Examples of jjil.core.Image


    seq.add(new Gray8HistEq());
    seq.add(new Gray8HorizVertContrast(5, 2, -8, 3));
    seq.add(new Gray16Threshold(20));
    seq.push(rgb);
    Gray8ConnComp gcc = new Gray8ConnComp();
    Image imThresh = seq.getFront();
    Gray8Rgb g2r = new Gray8Rgb();
    g2r.push(imThresh);
    if (DetectBarcode.bDebug) {
      Debug debug = new Debug();
      debug.toFile((RgbImage)g2r.getFront(), "test.jpg");
View Full Code Here


        int cWidthExp = Math.min(image.getWidth() - dLeft, cWidth * 7 / 6);
        seq.add(new Gray8Crop(dLeft, dTopLeftY, cWidthExp, cHeight));
        /* Apply the pipeline to get the cropped image.
         */
        seq.push(image);
        Image imageResult = seq.getFront();
        if (!(imageResult instanceof Gray8Image)) {
            throw new jjil.core.Error(
            jjil.core.Error.PACKAGE.ALGORITHM,
            jjil.algorithm.ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
            imageResult.toString(),
            null,
            null);
        }
        this.imageCropped = (Gray8Image) imageResult;
        {   Debug debug = new Debug();
          Gray8Rgb g2r = new Gray8Rgb();
          g2r.push(this.imageCropped);
          RgbImage rgb = (RgbImage) g2r.getFront();
          debug.toFile(rgb, "cropped.png"); //$NON-NLS-1$
        }
        /* Then do edge detection. The cWidth of the Canny operator is set
         * based on the cropped cWidth, which is supposed to be the
         * barcode cWidth.
         */
        int cCannyWidth = cWidth / 6;
        Gray8CannyHoriz canny = new Gray8CannyHoriz(cCannyWidth);
        /* Now apply the edge detection to the cropped mage
         */
        canny.push(imageCropped.clone());
        /* And obtain the result
         */
        imageResult = canny.getFront();
        if (!(imageResult instanceof Gray8Image)) {
            throw new jjil.core.Error(
            jjil.core.Error.PACKAGE.ALGORITHM,
            jjil.algorithm.ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
            imageResult.toString(),
            null,
            null);
        }
        this.imageEdge = (Gray8Image) imageResult;
        {  
View Full Code Here

                cTl,
                cTr,
                cBl,
                cBr);
        warp.push(this.imageCropped);
        Image imageResult = warp.getFront();
        if (!(imageResult instanceof Gray8Image)) {
            throw new jjil.core.Error(
            jjil.core.Error.PACKAGE.ALGORITHM,
            jjil.algorithm.ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
            imageResult.toString(),
            null,
            null);
        }
        {
          Debug debug = new Debug();
View Full Code Here

        // cMultiple is the smallest number of barcode cWidth's greater than the
        // input cWidth
        int cMultiple = ((cInputWidth + reader.getWidth() - 1) / reader.getWidth());
            // cTargetWidth is the width we'll stretch input cWidth to
        int cTargetWidth = reader.getWidth() * cMultiple;   
        Image imageStretched =
            cropAndStretchImage(
                    imageRectified,
                    dBestLeftPos-cJitter,
                    dBestRightPos+cJitter,
                    4,
View Full Code Here

TOP

Related Classes of jjil.core.Image

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.