Package jjil.debug

Examples of jjil.debug.Debug


    private boolean estimateBarcodes(Gray8Image image) throws jjil.core.Error
    {
      {
        Gray8Rgb g2r = new Gray8Rgb();
        g2r.push(image);
        Debug debug = new Debug();
        debug.toFile((RgbImage) g2r.getFront(), "barcode.png"); //$NON-NLS-1$
      }
        this.chLeft = new CodeHash();
        this.chRight = new CodeHash();
        int cPixelsPerBar = image.getWidth() / TotalWidth;
        int wSumLeftEdge = 0;
View Full Code Here


        int wSlopeRight) throws jjil.core.Error
    {
      {
        Gray8Rgb g2r = new Gray8Rgb();
        g2r.push(image);
        Debug debug = new Debug();
        debug.toFile((RgbImage) g2r.getFront(), "barcode.png"); //$NON-NLS-1$
      }
        this.chLeft = new CodeHash();
        this.chRight = new CodeHash();
        this.chBarCodes = new CodeHash();
        int wSumLeftEdge = 0;
View Full Code Here

    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");
    }
    gcc.push(imThresh);
    if (gcc.getComponentCount() == 0) {
      return false;
    }
View Full Code Here

            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;
        {  
          Debug debug = new Debug();
        Gray8Rgb g2r = new Gray8Rgb();
        g2r.push(this.imageEdge);
        RgbImage rgb = (RgbImage) g2r.getFront();
        debug.toFile(rgb, "edges.png"); //$NON-NLS-1$
      }
    }
View Full Code Here

            return false;
        }
        this.cYRight = fit.getY();
        this.wSlopeRight = fit.getSlope();
        {
          Debug debug = new Debug();
          Gray8Rgb g2r = new Gray8Rgb();
          g2r.push(this.imageEdge);
          debug.toFile((RgbImage) g2r.getFront(), "edges.png"); //$NON-NLS-1$
        }
        return true;
     }
View Full Code Here

            imageResult.toString(),
            null,
            null);
        }
        {
          Debug debug = new Debug();
          Gray8Rgb g2r = new Gray8Rgb();
          g2r.push(imageResult);
          debug.toFile((RgbImage) g2r.getFront(), "rectified.png"); //$NON-NLS-1$
        }
        this.imageRectified = (Gray8Image) imageResult;
    }
View Full Code Here

                    cInputWidth,
                    cTargetWidth);
        {
          Gray8Rgb g2r = new Gray8Rgb();
          g2r.push(imageStretched);
          new Debug().toFile((RgbImage) g2r.getFront(), "stretched.png"); //$NON-NLS-1$
        }
        // now look for a barcode in the stretched rectangle at positions 0..2*cJitter-1
        // (in the input image) which must be scaled by cTargetWidth / cInputWidth in
        // the stretched image
        int wGoodness = reader.decode(
View Full Code Here

TOP

Related Classes of jjil.debug.Debug

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.