Marginal improvement to datamatrix decoder

git-svn-id: https://zxing.googlecode.com/svn/trunk@937 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-05-11 21:02:08 +00:00
parent 436ee016d3
commit 793f4c7176

View file

@ -147,6 +147,10 @@ public final class Detector {
int dimension = Math.min(transitionsBetween(topLeft, topRight).getTransitions(),
transitionsBetween(bottomRight, topRight).getTransitions());
if ((dimension & 0x01) == 1) {
// it can't be odd, so, round... up?
dimension++;
}
dimension += 2;
BitMatrix bits = sampleGrid(image, topLeft, bottomLeft, bottomRight, dimension);