Finished work on the local binarizer and renamed it to HybridBinarizer. It uses the...
[zxing.git] / core / test / src / com / google / zxing / common / AbstractBlackBoxTestCase.java
index 19dc156..2ef12b4 100644 (file)
@@ -184,7 +184,7 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
         float rotation = testResults.get(x).getRotation();
         BufferedImage rotatedImage = rotateImage(image, rotation);
         LuminanceSource source = new BufferedImageLuminanceSource(rotatedImage);
-        BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));
+        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
         if (decode(bitmap, rotation, expectedText, false)) {
           passedCounts[x]++;
         }
@@ -212,9 +212,11 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
 
     int totalTests = imageFiles.length * testCount * 2;
     System.out.println("TOTALS:\n  Decoded " + totalFound + " images out of " + totalTests +
-      " (" + (totalFound * 100 / totalTests) + "%)");
+      " (" + (totalFound * 100 / totalTests) + "%, " + totalMustPass + " required)");
     if (totalFound > totalMustPass) {
       System.out.println("  *** Test too lax by " + (totalFound - totalMustPass) + " images");
+    } else if (totalFound < totalMustPass) {
+      System.out.println("  *** Test failed by " + (totalMustPass - totalFound) + " images");
     }
 
     // Then run through again and assert if any failed
@@ -292,4 +294,4 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
     }
   }
 
-}
\ No newline at end of file
+}