Skip to content

Unknown C++ exception from OpenCV code from python using QR Detect #26642

@thoyt-pfi

Description

@thoyt-pfi

System Information

OpenCV version: 4.10.0.82
Operating System / Platform: Windows 10 Version 22H2 (OS Build 19045.5247)
Python 3.9.13

Reproduced in Docker Image as well:
OpenCV version: 4.10.0.84
Operating System / Platform: Ubuntu 24.04.1
Python: 3.12.3

Detailed description

Particular images are hanging on the call to detect and decode for the QR Code Detector. They run for about 10 minutes and then provide the error: cv2.error: Unknown C++ exception from OpenCV code . WIthin the Docker Image described above they run for the same amount of time until throwing a Segmentation Fault. Alternatively, when these images are run through the same call on OpenCV Aruco QR Detector the errors are not encountered. In some cases we have observed that subtle changes to the images will lead to successful runs. Images are attached here.
053E9D618F012E84FB3029EB83D6246F-sample
sample_000003

Steps to reproduce

qcd = cv2.QRCodeDetector()
img = cv2.imread("Path/To/Image")
retval, decoded_info, points, straight_qrcode = qcd.detectAndDecodeMulti(img)

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions