projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor deletion of code that shouldn't have been committed
[zxing.git]
/
core
/
src
/
com
/
google
/
zxing
/
common
/
detector
/
WhiteRectangleDetector.java
diff --git
a/core/src/com/google/zxing/common/detector/WhiteRectangleDetector.java
b/core/src/com/google/zxing/common/detector/WhiteRectangleDetector.java
index
030d3a2
..
cb889dd
100644
(file)
--- a/
core/src/com/google/zxing/common/detector/WhiteRectangleDetector.java
+++ b/
core/src/com/google/zxing/common/detector/WhiteRectangleDetector.java
@@
-83,6
+83,11
@@
public final class WhiteRectangleDetector {
aBlackPointFoundOnBorder = true;
}
}
aBlackPointFoundOnBorder = true;
}
}
+
+ if (right >= width) {
+ sizeExceeded = true;
+ break;
+ }
// .....
// . .
// .....
// . .
@@
-95,6
+100,11
@@
public final class WhiteRectangleDetector {
aBlackPointFoundOnBorder = true;
}
}
aBlackPointFoundOnBorder = true;
}
}
+
+ if (down >= height) {
+ sizeExceeded = true;
+ break;
+ }
// .....
// | .
// .....
// | .
@@
-107,6
+117,11
@@
public final class WhiteRectangleDetector {
aBlackPointFoundOnBorder = true;
}
}
aBlackPointFoundOnBorder = true;
}
}
+
+ if (left < 0) {
+ sizeExceeded = true;
+ break;
+ }
// .___.
// . .
// .___.
// . .
@@
-120,7
+135,7
@@
public final class WhiteRectangleDetector {
}
}
}
}
- if (
right >= width || down >= height || up < 0 || left
< 0) {
+ if (
up
< 0) {
sizeExceeded = true;
break;
}
sizeExceeded = true;
break;
}
@@
-271,20
+286,20
@@
public final class WhiteRectangleDetector {
private boolean containsBlackPoint(int a, int b, int fixed, boolean horizontal) {
if (horizontal) {
private boolean containsBlackPoint(int a, int b, int fixed, boolean horizontal) {
if (horizontal) {
- for (int x = a; x < b; x++) {
+ for (int x = a; x <
=
b; x++) {
if (image.get(x, fixed)) {
return true;
}
}
} else {
if (image.get(x, fixed)) {
return true;
}
}
} else {
- for (int y = a; y < b; y++) {
+ for (int y = a; y <
=
b; y++) {
if (image.get(fixed, y)) {
return true;
}
if (image.get(fixed, y)) {
return true;
}
- }
}
}
-
- return false;
}
}
+ return false;
+ }
+
}
\ No newline at end of file
}
\ No newline at end of file