tinyzing
is an open-source library to read QR-codes with embedded devices in mind. This is a simplified version of ZXing C++ Port adapted to use C++17 features.
- Compile-time defined parameters such as image size and maximum QR version;
- No dynamic allocations;
- No exceptions;
- QR Code up to version N (defined at compilation time)
OpenCV demo depends on OpenCV >= 4.0.0.
- Edit
core/src/zxing/ZXingConfig.h
to defineImageWidth
andImageHeight
(this must be the exact dimension of the input image) andMaxGridSize
(this is used to compute the maximum supported QR version:
MaxSupportedQRVersion = (MaxGridSize - 17) / 4;
- If necessary, edit the parameters marked as TODO - these were defined in a way that works for my case but can be probably computed from QR version.
- In an empty build directory, invoke
cmake ..
to build the library and examples.
Run opencv_zxing
to detect QR codes using a webcam. Position the code inside the green box and observe the resulting black matrix:
This is a preview of the ESP32 demo. For more details and actual usage check my other repo OvenCamera.