mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 13:04:05 -08:00
Tuned the Code 128 parameters:
Right-side up went from 9/40 to 33/40 Upside down went from 8/40 to 34/40 and try harder now gets 39/40. git-svn-id: https://zxing.googlecode.com/svn/trunk@462 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
834bc3297a
commit
d713f52437
|
@ -142,8 +142,8 @@ public final class Code128Reader extends AbstractOneDReader {
|
|||
{2, 3, 3, 1, 1, 1, 2}
|
||||
};
|
||||
|
||||
private static final int MAX_AVG_VARIANCE = (int) (PATTERN_MATCH_RESULT_SCALE_FACTOR * 0.1875f);
|
||||
private static final int MAX_INDIVIDUAL_VARIANCE = (int) (PATTERN_MATCH_RESULT_SCALE_FACTOR * 0.35f);
|
||||
private static final int MAX_AVG_VARIANCE = (int) (PATTERN_MATCH_RESULT_SCALE_FACTOR * 0.25f);
|
||||
private static final int MAX_INDIVIDUAL_VARIANCE = (int) (PATTERN_MATCH_RESULT_SCALE_FACTOR * 0.7f);
|
||||
|
||||
private static final int CODE_SHIFT = 98;
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ public final class Code128BlackBox2TestCase extends AbstractBlackBoxTestCase {
|
|||
|
||||
public Code128BlackBox2TestCase() {
|
||||
super(new File("test/data/blackbox/code128-2"), new MultiFormatReader(), BarcodeFormat.CODE_128);
|
||||
addTest(9, 0.0f);
|
||||
addTest(8, 180.0f);
|
||||
addTest(33, 0.0f);
|
||||
addTest(34, 180.0f);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue