New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cv2.imshow opens multiple windows with "opencv-python" package from Pypi #17827
Comments
|
I got OpenCV via pip3 in a virtual environment, the exact version I'm using is 4.3.0.36. Should I try to build from source code?
I see only one process. I was able to reproduce the problem also without multithreading, in a basic code like this:
|
Last example works as expected (two different names - two windows) First example is invalid:
Usage questions should go to Users OpenCV Q/A forum: http://answers.opencv.org |
Not on my configuration apparently. Still trying to understand why.
I didn't know that. I will find some alternative approach. |
I got the same problem and I use single thread
This is the code
|
There is missing required check for empty/None returned frame in provided code. Try to capture parameters details through
|
I added a validation for empty frames and I still got same error, I don't' see those methods available on opencv libraries for python. The code works perfectly fine on windows os |
Minimal code with problem reproducer on
Sporadic shows 1-3 windows on mentioned version with bundled Qt backend:
Also see many warnings like these:
Can't reproduce with local build with System Qt (Fedora 31,
Extra windows or warnings are not observed. Package |
Package
opencv-python==4.2.0.34
opencv-python==4.3.0.36
Second variant loads (after own bundled Qt binaries):
This causes conflict and malformed behavior. Not sure that this can be fixed in OpenCV source code. BTW, OpenCV 4.2.0 => 4.3.0 highgui changes: |
I tested the code with version 3.4.10.35 and the error is the same |
@alalek Thanks for those debug outputs. This issue cannot be fixed in OpenCV, the issue is related to Qt conflicts between the bundled Qt4 in the Python wheels and system Qt4/5 installations. |
System information
Detailed description
cv2.imshow
opens multiple windows with the same name when used withcv2.videoCapture
and multithreading.This it is not happening with version 4.2.
opencv-python
issue: opencv/opencv-python#362Steps to reproduce
Minimal reproducer is here
Original reported code:
Minimum Python code to reproduce:
Attached screenshot:
The text was updated successfully, but these errors were encountered: