Comments (3)
TLDR: replace
zxing-cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp
Lines 288 to 289 in 07e5600
return 0;
I started working on this new c++ port by @huycn and expected it to work fine here, since it is based on the up-to-date Java code. Interestingly, it failed to decode the QR-code just like you described. I debugged the code and found the problem. What I don't understand is, how the Java version would work here, since the problematic section is exactly the same code (as far as I can tell).
The issue is that a wrong finder pattern is detected, leading to the wrong dimension estimate, leading the invalid version number. That happens because the findRowSkip
method, which is supposed to skip a few lines for detection speedup after two finder patterns have been found, results in a smaller count
(here 2) for the two upper finder patterns compared to a wrongly detected pattern left of the image center (gets count 5). If the findRowSkip
gets disabled (see above) the two upper patterns get a count
of 12 which leads to the wrong one being removed instead of the correct upper-right one.
So no idea how the Java version deals with this but in my opinion, the findRowSkip
related code is buggy (in upstream Java and both c++ ports).
from zxing-cpp.
Sorry about my late reply.
I intended to check the version data between JAVA version and C++ version.
But at first I check the logic searching finder patterns.
Thank you for an important information.
from zxing-cpp.
@huycn did have a look at how the JAVA version was able to detect the code and it turned out that you need to set the tryRotate
flag. Then both upstream and his port successfully detect it. That fits with my above analysis, because then the 'wrong' pattern gets skipped at the same time as the two good ones are. I bet there is a good chance the C++ code in here behaves the same way if you set that flag. I'd still argue that the way this findRowSkip
is used/implemented has room for improvement :).
from zxing-cpp.
Related Issues (20)
- Get raw data from datamatrix code
- Should we add an option to compile with no exceptions?
- Darwin build fails HOT 1
- build error on win10 x64 HOT 1
- [Q] Custom barcode zebra format
- can't decode code93 with the c++ version
- ${OpenCV_LIBRARIES} needs to be added to zxing
- warning: shifting a negative signed value is undefined
- cannot decode EAN8, code93, UPC-E !!!??? HOT 1
- Display zxing::BinaryBitmap
- This picture is not supported
- zxing command line utility should not add newline to output on stdout
- After test, recognition rate is low in some situation? HOT 1
- decoding failed HOT 1
- ECCN for zxing-cpp
- WASM support HOT 1
- Join forces (with nu-book/zxing-cpp)?
- UPC-E/EAN-8 clash
- Datamatrix performance HOT 2
- In ARM platform, camera pix format NV12, how can I detect the QR from NV12 stream? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zxing-cpp.