Tightened a condition to reduce accidentally detecting the alignment pattern as a finder pattern

git-svn-id: https://zxing.googlecode.com/svn/trunk@856 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-02-15 09:43:40 +00:00
parent bb1ea56404
commit 8e18d651bb
2 changed files with 2 additions and 2 deletions

View file

@ -462,7 +462,7 @@ final class FinderPatternFinder {
FinderPattern pattern = (FinderPattern) possibleCenters.elementAt(i);
totalDeviation += Math.abs(pattern.getEstimatedModuleSize() - average);
}
return totalDeviation <= 0.15f * totalModuleSize;
return totalDeviation <= 0.05f * totalModuleSize;
}
/**

View file

@ -29,7 +29,7 @@ public final class QRCodeBlackBox4TestCase extends AbstractBlackBoxTestCase {
public QRCodeBlackBox4TestCase() {
super("test/data/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE);
addTest(32, 32, 0.0f);
addTest(33, 33, 0.0f);
addTest(33, 33, 90.0f);
addTest(32, 32, 180.0f);
addTest(32, 32, 270.0f);