--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+9780441014989
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2009 ZXing authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.zxing.oned;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.MultiFormatReader;
+import com.google.zxing.common.AbstractBlackBoxTestCase;
+
+/**
+ * A very difficult set of images taken with extreme shadows and highlights.
+ * @author dswitkin@google.com (Daniel Switkin)
+ */
+public final class EAN13BlackBox4TestCase extends AbstractBlackBoxTestCase {
+
+ public EAN13BlackBox4TestCase() {
+ super("test/data/blackbox/ean13-4", new MultiFormatReader(), BarcodeFormat.EAN_13);
+ addTest(6, 12, 0.0f);
+ addTest(7, 13, 180.0f);
+ }
+
+}
package com.google.zxing.client.j2se;
-import com.google.zxing.MonochromeBitmapSource;
import com.google.zxing.BlackPointEstimationMethod;
+import com.google.zxing.MonochromeBitmapSource;
import com.google.zxing.ReaderException;
import com.google.zxing.common.BitArray;
-import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URI;
+import javax.imageio.ImageIO;
+
/**
* Utility application for evaluating the effectiveness of the BlackPointEstimator used by
* MonochromeBitmapSource. Given a set of images on the command line, it converts each to a
if (inputFile.exists()) {
if (inputFile.isDirectory()) {
for (File input : inputFile.listFiles()) {
+ String filename = input.getName().toLowerCase();
+ // Skip hidden files and text files (the latter is found in the blackbox tests).
+ if (filename.startsWith(".") || filename.endsWith(".txt")) {
+ continue;
+ }
+ // Skip the results of dumping the black point.
+ if (filename.contains(".mono.png") || filename.contains(".row.png") ||
+ filename.contains(".2d.png")) {
+ continue;
+ }
convertImage(input.toURI());
}
} else {
name = name.substring(0, dotpos);
}
String suffix = (sMethod == BlackPointEstimationMethod.ROW_SAMPLING) ? "row" : "2d";
- result = new File(name + "_converted_" + suffix + '.' + FORMAT);
+ result = new File(name + '.' + suffix + '.' + FORMAT);
}
return result;
}