approach is to stop testing for min/max values once the dynamic range
condition is satisfied.
On "typical" images, the function is about 20% faster. Worst-case images
(low contrast images) can be slower but they are less likely to be read
successfully.
This change makes no change to test results, only performance.
git-svn-id: https://zxing.googlecode.com/svn/trunk@2174 59b500cc-1b3d-0410-9834-0bbf25fbcc57
- Some of the cpp tests still fail to compile, but that's covered in issue 1066.
- I tweaked the SConscript to be a little happier with OS X and cppunit and imagemagick
in /opt/local. These should be benign on other systems but let me know if they aren't
and I'll back tweak them or back them out.
git-svn-id: https://zxing.googlecode.com/svn/trunk@2057 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Not quite gcc -pedantic clean: there are some variable-length auto arrays that aren't
standard C++. I don't want to touch those at this point.
git-svn-id: https://zxing.googlecode.com/svn/trunk@2056 59b500cc-1b3d-0410-9834-0bbf25fbcc57
- remove some uses of floating min/max fns: use the same integer code as java
- Generalize counted pointers to compare against pointers instead of just integer 0
- Careless string error I added when porting some java code
git-svn-id: https://zxing.googlecode.com/svn/trunk@2054 59b500cc-1b3d-0410-9834-0bbf25fbcc57
The rotate code was setting the rotated points in a copy of the vector of points, rather than
in the vector owned by the result. Use a reference instead of a copy so changes persist.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1995 59b500cc-1b3d-0410-9834-0bbf25fbcc57
I tweaked things a little, small formatting (to help me diff) and
made some of the protection levels match the Java code. Nothing
semantic.
Great work. Thanks!
git-svn-id: https://zxing.googlecode.com/svn/trunk@1986 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This provide C++ support for Hanzi from issue 582. With it the C++
qrcode blackbox test results again match the Java results.
The changes are mostly a re-port of various pieces of the Java code
for supporting modes and bit stream parsing in QR codes. It expands
the modes/parsing including ECI and FNC, refactors StringUtils as was
done in Java, and makes DecoderResult include the fields that the Java
code has.
Although the non-qrcode blackbox tests don't all match the Java code
(a known issue) the entire blackbox suite was run under valgrind and
has no errors, including invalid memory references and leaks.
This commit also includes a few cleanups for things like files that
had mixed line endings, i.e., a combination of LF and CR-LF.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1966 59b500cc-1b3d-0410-9834-0bbf25fbcc57
re-port
Detector::sizeOfBlackWhiteBlackRunBothWays
and
Detector::sizeOfBlackWhiteBlackRun
to reflect changes from r1820 and earlier.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1838 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Semantically, this is just C++ version of the changes from Java. I also did
some minor renaming of variables to match the current Java source to aide
in keeping the two trees in sync.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1754 59b500cc-1b3d-0410-9834-0bbf25fbcc57
x coordinate of 1D barcodes to always be flipped, as if they had been
read upside down.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1547 59b500cc-1b3d-0410-9834-0bbf25fbcc57