You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The python repository issue-template mentioned that issues that have to be fixed in C++ as well should be reported here.
Although the example is purely python. The example relies on matplotlib and may not be caused by opencv directly, but the segfault happens when calling a opencv function, so I'm reporting it here.
System information (version)
OpenCV => 4.6.0-4 (this is the package I'm using, it looks like it's using gcc, but I honestly can't tell)
Python-OpenCV => 4.6.0.66
Operating System / Platform => Arch Linux 5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
Compiler => gcc (GCC) 12.2.0 (see note above)
Detailed description
When importing matplotlib.pyplot and then setting a backend for matplotlib before using opencv the first call to imshow causes a segmentation fault.
Steps to reproduce
Set up a python environment using Python 3.9.13 with the following packages:
importmatplotlibasmplimportcv2# swapping the order of thsese also resolves the issuefrommatplotlibimportpyplotasplt# removing this import resoves the issuempl.use('GTK3Agg') # remvoing this also resovle the issuedeftest():
webcam=cv2.VideoCapture(0)
try:
whileTrue:
ret, frame=webcam.read()
# segfault happens on the first call to `imshow`cv2.imshow('frame', frame)
ifcv2.waitKey(1) &0xFF==ord('q'):
breakfinally:
webcam.release()
cv2.destroyAllWindows()
test()
Running the script.
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
The text was updated successfully, but these errors were encountered:
The python repository issue-template mentioned that issues that have to be fixed in C++ as well should be reported here.
Although the example is purely python. The example relies on
matplotlib
and may not be caused byopencv
directly, but the segfault happens when calling aopencv
function, so I'm reporting it here.System information (version)
4.6.0-4
(this is the package I'm using, it looks like it's using gcc, but I honestly can't tell)4.6.0.66
5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
gcc (GCC) 12.2.0
(see note above)Detailed description
When importing
matplotlib.pyplot
and then setting a backend formatplotlib
before usingopencv
the first call toimshow
causes a segmentation fault.Steps to reproduce
3.9.13
with the following packages:Issue submission checklist
The text was updated successfully, but these errors were encountered: