Airfrog editorial team ·

Alternatives to ZXing: What to Check When It Misses QR Codes

What can replace ZXing for QR code reading? Compare it with Airfrog, OpenCV, and WeChat. Diagnose missed codes, multiple codes, and migration to another Python decoder.

When ZXing does not detect a QR code

Start by identifying the implementation and version. The original ZXing library for Java and ZXing-C++ are separate projects; a failed call in one does not characterize both. Save the source file, frame size, detector settings, expected text, and QR coordinates. Test that exact file, not a recompressed screenshot.

  1. Confirm that the input loads and the correct code format is selected.
  2. Check sharpness, contrast, resolution, and the quiet zone.
  3. Use multi-code decoding for images with several labels.
  4. Compare another library on the same frames, including ones the current decoder reads successfully.

If a damaged QR code is unreadable, do not start by trying endless filters. Check the limits of recovery and finder-pattern damage separately.

Multiple codes and the wrong decoding method

A single-result method is not suitable for a frame with several QR codes. The ZXing-C++ Python binding includes zxingcpp.read_barcodes(image), which returns a list. Check this before replacing an SDK; otherwise, the comparison will measure API differences instead of decoding quality.

A complete frame is one where every expected QR code was decoded and there are no extra results. Track identical text on different labels by their coordinates. Airfrog provides decode_all for this case; the multiple QR code example shows why finding one code does not always mean success.

Airfrog, ZXing-C++, OpenCV, or WeChat

In Airfrog's own test dated 2026-10-18, ZXing-C++ 2.3.0 fully decoded 189/225 frames, with an average time of 2.9 ms. Airfrog decoded 209/225 frames in 12.9 ms. In this test, Airfrog produced more complete frames while ZXing-C++ was faster. This is an internal measurement with limitations, not an independent ranking or a comparison against the latest available version of every library.

If your images already decode reliably, changing decoders may add latency without a useful gain. For difficult frames, also compare standard OpenCV QRCodeDetector and WeChat QRCode as separate options. See the results, versions, and methodology, then repeat the test on your own sample.

Replacing ZXing in Python and what C++ requires

Switching to Airfrog changes the input: its Python API accepts image bytes and returns text with corners, while zxingcpp.read_barcodes works with a supported image object. Include any conversions when measuring latency; do not exclude them for only one candidate.

The Airfrog Python example shows the input, errors, and result. If you need a C++ ABI, agree on that interface separately: Airfrog's core is written in Rust, and this page does not claim a ready-to-use C++ API. Keep the current decoder until you have tested all important scenarios.

Interface references: ZXing-C++ and its Python binding.

How to choose a QR code library

Start with the reason for switching. If the library reads all your images and the problem is one incorrect API call, it may be too early to replace the component. If it regularly misses labels on the same types of frames, you have a concrete sample to compare.

From the task to evaluating a ZXing alternative
Your situationWhat to compare
One clear QR code at high volumeLatency and resource use; keep ZXing-C++ as the baseline.
Several QR codes on one packageFully decoded frames and whether identical text at different positions is preserved.
Regular misses on difficult photosAirfrog, WeChat, and the current decoder on source files, including successful frames.
Several barcode formats are requiredSupport for each format separately. Airfrog's QR results do not confirm support for other formats.

For example, the current decoder quickly reads two of three QR codes. If your system requires all three labels, that attempt still needs another capture. A slower decoder may be more useful if it actually reduces retries. Compare time to a completed operation along with the share of cases that require manual handling.

Before switching, keep the input identical and use a shared result format: text, position, status, and time. Test the change on saved images, then on new frames that were not used to choose settings. Only after that should you change the decoder in your workflow.

ZXing replacement FAQ

Is Airfrog always better than ZXing?

The published test does not show that. Airfrog produced more fully decoded frames in our sample, while ZXing-C++ took less time on average. Your result depends on the images and the cost of a missed code; compare both measures.

Can I run two decoders one after the other?

Your application can try the current library first and use another for a retry. Decide in advance how you will detect an incomplete frame. If you do not know the expected number of codes, finding one QR is not a reliable signal to stop. Measure the combined latency of both attempts.

Where should I start if ZXing reads phone photos but not camera images?

Compare source files from both devices for QR size, sharpness, quiet zones, and compression. A close-up sharp photo does not test a small label in a full frame. See the guide to image capture conditions.