Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce PDF417 variance leniency (fixes #1624) #1628

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class Detector {
private static final int[] INDEXES_START_PATTERN = {0, 4, 1, 5};
private static final int[] INDEXES_STOP_PATTERN = {6, 2, 7, 3};
private static final float MAX_AVG_VARIANCE = 0.42f;
private static final float MAX_INDIVIDUAL_VARIANCE = 0.8f;
private static final float MAX_INDIVIDUAL_VARIANCE = 0.7f;

// B S B S B S B S Bar/Space pattern
// 11111111 0 1 0 1 0 1 000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public final class PDF417BlackBox1TestCase extends AbstractBlackBoxTestCase {

public PDF417BlackBox1TestCase() {
super("src/test/resources/blackbox/pdf417-1", new MultiFormatReader(), BarcodeFormat.PDF_417);
addTest(10, 10, 0.0f);
addTest(10, 10, 90.0f);
addTest(10, 10, 180.0f);
addTest(10, 10, 270.0f);
addTest(11, 11, 0.0f);
addTest(11, 11, 90.0f);
addTest(11, 11, 180.0f);
addTest(11, 11, 270.0f);
}

}
}
Binary file added core/src/test/resources/blackbox/pdf417-1/12.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/src/test/resources/blackbox/pdf417-1/12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
+A+CDMEABCDEFGHIJABCDFEFGH