Solution for the "window - not responding" problem with cv2.imshow()
pip install a-cv2-imshow-thread
Usage:
import glob
import os
from a_cv2_imshow_thread import add_imshow_thread_to_cv2
add_imshow_thread_to_cv2() #monkey patching
import cv2
image_background_folder=r'C:\yolovtest\backgroundimages'
pics=[cv2.imread(x) for x in glob.glob(f'{image_background_folder}{os.sep}*.png')]
cv2.imshow_thread( image=pics[0], window_name='screen1',sleep_time=None, quit_key='q') #single picture
cv2.imshow_thread( image=pics, window_name='screen1',sleep_time=.2, quit_key='e') #sequence of pics like a video clip
Parameters:
image: Union[list, np.ndarray]
You can pass a list of images or a single image
window_name: str
Window title
(default = "")
sleep_time: Union[float, int, None] = None
Useful if you have an image sequence.
If you pass None, you will have to press the quit_key to continue
(default = None)
quit_key: str = "q"
key to close the window
Returns:
None
Metadata
Release files for a-cv2-imshow-thread 0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| a_cv2_imshow_thread-0.11.tar.gz | 3.8 kB | Without provenance | Details for a_cv2_imshow_thread-0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| a_cv2_imshow_thread-0.11-py3-none-any.whl | Python 3 | none | any | Details for a_cv2_imshow_thread-0.11-py3-none-any.whl |
Total release size: 9.6 kB
Release files / a_cv2_imshow_thread-0.11.tar.gz
| Download URL | a_cv2_imshow_thread-0.11.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae118a0135106af64ab4b5662d13693cae306da587223ff32abd4c9b62dff0e7
|
|
BLAKE2b-256 checksum How to use checksums |
9e21e8fa7d9d85ebf6a26647a5b7f6e22d07eb50fa32a96661ab7ae152d606d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / a_cv2_imshow_thread-0.11-py3-none-any.whl
| Download URL | a_cv2_imshow_thread-0.11-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d825fa887c2b3b1b91913163ef8e01d1a05d7914c0ef352b5584812d9cce637
|
|
BLAKE2b-256 checksum How to use checksums |
92288eb4a6a86eb443ebcba34e24357224c80561007489023f0d4c7711316b1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for a-cv2-imshow-thread 0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.