Alternate multi QR Code reader from Hannes
[zxing.git] / core / src / com / google / zxing / qrcode / detector / Detector.java
index a933f06..0f28ec9 100644 (file)
@@ -33,7 +33,7 @@ import java.util.Hashtable;
  *
  * @author Sean Owen
  */
-public final class Detector {
+public class Detector {
 
   private final MonochromeBitmapSource image;
 
@@ -41,6 +41,10 @@ public final class Detector {
     this.image = image;
   }
 
+  protected MonochromeBitmapSource getImage() {
+    return image;
+  }
+
   /**
    * <p>Detects a QR Code in an image, simply.</p>
    *
@@ -68,6 +72,11 @@ public final class Detector {
     FinderPatternFinder finder = new FinderPatternFinder(image);
     FinderPatternInfo info = finder.find(hints);
 
+    return processFinderPatternInfo(info);
+  }
+
+  protected DetectorResult processFinderPatternInfo(FinderPatternInfo info) throws ReaderException {
+
     FinderPattern topLeft = info.getTopLeft();
     FinderPattern topRight = info.getTopRight();
     FinderPattern bottomLeft = info.getBottomLeft();