public Code128BlackBox2TestCase() {
super("test/data/blackbox/code128-2", new MultiFormatReader(), BarcodeFormat.CODE_128);
- addTest(35, 39, 0.0f);
+ addTest(36, 39, 0.0f);
addTest(36, 39, 180.0f);
}
public EAN13BlackBox1TestCase() {
super("test/data/blackbox/ean13-1", new MultiFormatReader(), BarcodeFormat.EAN_13);
- addTest(29, 31, 0.0f);
- addTest(27, 31, 180.0f);
+ addTest(30, 32, 0.0f);
+ addTest(27, 32, 180.0f);
}
}
\ No newline at end of file
\r
public ITFBlackBox1TestCase() {\r
super("test/data/blackbox/itf-1", new MultiFormatReader(), BarcodeFormat.ITF);\r
- addTest(9, 12, 0.0f);\r
- addTest(12, 12, 180.0f);\r
+ addTest(8, 12, 0.0f);\r
+ addTest(11, 12, 180.0f);\r
}\r
\r
}\r
public UPCABlackBox1TestCase() {
super("test/data/blackbox/upca-1", new MultiFormatReader(), BarcodeFormat.UPC_A);
- addTest(16, 18, 0.0f);
- addTest(17, 18, 180.0f);
+ addTest(14, 18, 0.0f);
+ addTest(16, 18, 180.0f);
}
}
\ No newline at end of file
public UPCABlackBox3ReflectiveTestCase() {
super("test/data/blackbox/upca-3", new MultiFormatReader(), BarcodeFormat.UPC_A);
addTest(7, 8, 0.0f);
- addTest(7, 9, 180.0f);
+ addTest(8, 9, 180.0f);
}
}
public UPCABlackBox4TestCase() {
super("test/data/blackbox/upca-4", new MultiFormatReader(), BarcodeFormat.UPC_A);
- addTest(8, 11, 0.0f);
+ addTest(9, 11, 0.0f);
addTest(9, 11, 180.0f);
}
int pixel = rgbData[x];
int luminance = (306 * ((pixel >> 16) & 0xFF) +
601 * ((pixel >> 8) & 0xFF) +
- 117 * (pixel & 0xFF)) >> 10;
+ 117 * (pixel & 0xFF) +
+ (0x200)) >> 10; // 0x200 = 1<<9, half an lsb of the result to force rounding
row[x] = (byte) luminance;
}
return row;