mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Reverted inadvertent Detector changes that broke unit tests. Fixed test target to definitely exclude non-TestCase classes from tests.
git-svn-id: https://zxing.googlecode.com/svn/trunk@548 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c58ae8b68d
commit
7c6276d89b
|
@ -159,6 +159,7 @@
|
|||
</assertions>
|
||||
<batchtest>
|
||||
<fileset dir="test/src">
|
||||
<include name="**/*TestCase.java"/>
|
||||
<exclude name="**/*BlackBox*TestCase.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
|
|
|
@ -68,20 +68,20 @@ public final class Detector {
|
|||
int width = image.getWidth();
|
||||
int halfHeight = height >> 1;
|
||||
int halfWidth = width >> 1;
|
||||
int iSkip = Math.max(1, height / (MAX_MODULES << 2));
|
||||
int jSkip = Math.max(1, width / (MAX_MODULES << 2));
|
||||
int iSkip = Math.max(1, height / (MAX_MODULES << 3));
|
||||
int jSkip = Math.max(1, width / (MAX_MODULES << 3));
|
||||
|
||||
int minI = 0;
|
||||
int maxI = height;
|
||||
int minJ = 0;
|
||||
int maxJ = width;
|
||||
ResultPoint pointA = findCornerFromCenter(halfHeight, -iSkip, minI, maxI, halfWidth, 0, minJ, maxJ, halfWidth >> 2);
|
||||
ResultPoint pointA = findCornerFromCenter(halfHeight, -iSkip, minI, maxI, halfWidth, 0, minJ, maxJ, halfWidth >> 1);
|
||||
minI = (int) pointA.getY() - 1;
|
||||
ResultPoint pointB = findCornerFromCenter(halfHeight, 0, minI, maxI, halfWidth, -jSkip, minJ, maxJ, halfHeight >> 2);
|
||||
ResultPoint pointB = findCornerFromCenter(halfHeight, 0, minI, maxI, halfWidth, -jSkip, minJ, maxJ, halfHeight >> 1);
|
||||
minJ = (int) pointB.getX() - 1;
|
||||
ResultPoint pointC = findCornerFromCenter(halfHeight, 0, minI, maxI, halfWidth, jSkip, minJ, maxJ, halfHeight >> 2);
|
||||
ResultPoint pointC = findCornerFromCenter(halfHeight, 0, minI, maxI, halfWidth, jSkip, minJ, maxJ, halfHeight >> 1);
|
||||
maxJ = (int) pointC.getX() + 1;
|
||||
ResultPoint pointD = findCornerFromCenter(halfHeight, iSkip, minI, maxI, halfWidth, 0, minJ, maxJ, halfWidth >> 2);
|
||||
ResultPoint pointD = findCornerFromCenter(halfHeight, iSkip, minI, maxI, halfWidth, 0, minJ, maxJ, halfWidth >> 1);
|
||||
maxI = (int) pointD.getY() + 1;
|
||||
// Go try to find point A again with better information -- might have been off at first.
|
||||
pointA = findCornerFromCenter(halfHeight, -iSkip, minI, maxI, halfWidth, 0, minJ, maxJ, halfWidth >> 2);
|
||||
|
|
Loading…
Reference in a new issue