Package com.google.zxing

Examples of com.google.zxing.LuminanceSource


  }

  public String decode(BufferedImage image) {

    // convert the image to a binary bitmap source
    LuminanceSource source = new BufferedImageLuminanceSource(image);
    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));

    // decode the barcode
    QRCodeReader reader = new QRCodeReader();
View Full Code Here


   * Returns all Result objects from barcode recognition of the given image.
   * @param image Buffered image for barcode recognition.
   * @return Results array.
   */
  public static Result[] getBarcodeResults(BufferedImage image) {
    LuminanceSource source = new BufferedImageLuminanceSource(image);
    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
    Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>();
    hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
    Result[] results = null;
    try {
View Full Code Here

TOP

Related Classes of com.google.zxing.LuminanceSource

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.