-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Copy link
Labels
Milestone
Description
System Information
Using both the c++ lib and opencv-python:
Issue not present in 4.8
Issue start with version: 4.9
Issue still present in 4.11
Detailed description
QRCodeEncoder does not work with more than 135 characters and auto detected version, no error is logged but the generated QR code is not detected by any QR scanner.
Steps to reproduce
data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
qr_encoder = cv2.QRCodeEncoder.create()
qr_code = qr_encoder.encode(data)=> the generated QR code is not detected by any QR scanner
Workaround, add the version manually:
data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
params = cv2.QRCodeEncoder.Params()
params.version = 7
qr_encoder = cv2.QRCodeEncoder.create(params)
qr_code = qr_encoder.encode(data)Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable