mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Small bug fix from Ralf
git-svn-id: https://zxing.googlecode.com/svn/trunk@1140 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
edddb45040
commit
e0fc79fda0
|
@ -223,10 +223,10 @@ public class Detector {
|
||||||
(int) pattern.getX(),
|
(int) pattern.getX(),
|
||||||
(int) pattern.getY());
|
(int) pattern.getY());
|
||||||
if (Float.isNaN(moduleSizeEst1)) {
|
if (Float.isNaN(moduleSizeEst1)) {
|
||||||
return moduleSizeEst2;
|
return moduleSizeEst2 / 7.0f;
|
||||||
}
|
}
|
||||||
if (Float.isNaN(moduleSizeEst2)) {
|
if (Float.isNaN(moduleSizeEst2)) {
|
||||||
return moduleSizeEst1;
|
return moduleSizeEst1 / 7.0f;
|
||||||
}
|
}
|
||||||
// Average them, and divide by 7 since we've counted the width of 3 black modules,
|
// Average them, and divide by 7 since we've counted the width of 3 black modules,
|
||||||
// and 1 white and 1 black module on either side. Ergo, divide sum by 14.
|
// and 1 white and 1 black module on either side. Ergo, divide sum by 14.
|
||||||
|
|
Loading…
Reference in a new issue