opencv / opencv/opencv-python

QRCodeDetector() not working

Open
#1,016 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.4k
Forks
1k
Avg merge
22h 17m
Merged PRs (30d)
3

Description

screenschot_nogo

Why this picture, can not be decoded?
I can read this picture, displayed on PC, with my Galaxy S20 Handy. The QR-Text is o.k. !
Also in Banking Applications i can read this picture.


img = cv2.imread("./output_UPC_Jun/screenschot_nogo.png ")  

cv2.imshow("img", img)
print("irgend eine Taste drücken für weiter .....")
cv2.waitKey(0)
cv2.destroyAllWindows()
# initialize the cv2 QRCode detector
detector = cv2.QRCodeDetector()
# detect and decode
data, bbox, straight_qrcode = detector.detectAndDecode(img)

# if there is a QR code
if bbox is not None:
    print(f"there is a QR code, data:\n{data}")
    
else:
    print("ERROR: there is no QR code !!!!!")
  • operating system: WIN 11
  • architecture ( x86)
  • opencv-python version: -PS C:\projekte\Python> pip install --upgrade pip
    Requirement already satisfied: pip in c:\users\hs3\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (24.2
Issue submission checklist
  • [x ] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

  • [x ] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)

  • [ x] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")

  • [x ] I'm using the latest version of opencv-python

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Python snippet, the referenced screenshot, and the reported Windows 11 environment; no repository file or test is identified. First determine whether the behavior can be reproduced with the installed opencv-python package and whether it belongs in this build-toolchain repository; done means a reproducible package issue with a relevant test or a clear explanation of the correct project.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.