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:
dswitkin 2008-06-20 19:57:48 +00:00
parent 834bc3297a
commit d713f52437
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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);
}
}