[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
flyashi
flyashi at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:32:37 UTC 2010
The following commit has been merged in the upstream branch:
commit 57da5c0fc1e8da0eaba6e401f333653bb0838ec6
Author: flyashi <flyashi at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Thu Jul 29 18:52:24 2010 +0000
C++ port: UPCEAN reader fixes
- make UPCEANReader fail if there's no quiet zone after the end marker, vastly reducing UPC_E false positives
git-svn-id: http://zxing.googlecode.com/svn/trunk@1495 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/cpp/core/src/zxing/oned/UPCEANReader.cpp b/cpp/core/src/zxing/oned/UPCEANReader.cpp
index e0154c5..ef143b8 100644
--- a/cpp/core/src/zxing/oned/UPCEANReader.cpp
+++ b/cpp/core/src/zxing/oned/UPCEANReader.cpp
@@ -113,14 +113,13 @@ namespace zxing {
int* endRange = decodeEnd(row, endStart);
-#pragma mark QuietZone needs some change
// Make sure there is a quiet zone at least as big as the end pattern after the barcode. The
// spec might want more whitespace, but in practice this is the maximum we can count on.
-// int end = endRange[1];
-// int quietEnd = end + (end - endRange[0]);
-// if (quietEnd >= row->getSize() || !row->isRange(end, quietEnd, false)) {
-// throw ReaderException("Quiet zone asserrt fail.");
-// }
+ size_t end = endRange[1];
+ size_t quietEnd = end + (end - endRange[0]);
+ if (quietEnd >= row->getSize() || !row->isRange(end, quietEnd, false)) {
+ throw ReaderException("Quiet zone asserrt fail.");
+ }
if (!checkChecksum(tmpResultString)) {
if (startGuardRange!=NULL) {
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list