a-cv2-imshow-thread


Namea-cv2-imshow-thread JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_cv2_imshow_thread
SummarySolution for the window - not responding problem with cv2.imshow()
upload_time2022-10-16 02:36:57
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords opencv cv2 imshow
VCS
bugtrack_url
requirements numpy opencv_python
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
### Solution for the "window - not responding" problem with cv2.imshow()



```python

pip install a-cv2-imshow-thread

```



```python

    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

```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_cv2_imshow_thread",
    "name": "a-cv2-imshow-thread",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "OpenCV,cv2,imshow",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9e/21/e8fa7d9d85ebf6a26647a5b7f6e22d07eb50fa32a96661ab7ae152d606d5/a_cv2_imshow_thread-0.11.tar.gz",
    "platform": null,
    "description": "\n### Solution for the \"window - not responding\" problem with cv2.imshow()\n\n\n\n```python\n\npip install a-cv2-imshow-thread\n\n```\n\n\n\n```python\n\n    Usage:\n\n\n\n    import glob\n\n    import os\n\n    from a_cv2_imshow_thread import add_imshow_thread_to_cv2 \n\n    add_imshow_thread_to_cv2() #monkey patching\n\n    import cv2\n\n    image_background_folder=r'C:\\yolovtest\\backgroundimages'\n\n    pics=[cv2.imread(x) for x in glob.glob(f'{image_background_folder}{os.sep}*.png')]\n\n    cv2.imshow_thread( image=pics[0], window_name='screen1',sleep_time=None, quit_key='q') #single picture\n\n    cv2.imshow_thread( image=pics, window_name='screen1',sleep_time=.2, quit_key='e') #sequence of pics like a video clip\n\n\n\n        Parameters:\n\n            image: Union[list, np.ndarray]\n\n                You can pass a list of images or a single image\n\n            window_name: str\n\n                Window title\n\n                (default = \"\")\n\n            sleep_time: Union[float, int, None] = None\n\n                Useful if you have an image sequence.\n\n                If you pass None, you will have to press the quit_key to continue\n\n                (default = None)\n\n            quit_key: str = \"q\"\n\n                key to close the window\n\n        Returns:\n\n            None\n\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Solution for the window - not responding problem with cv2.imshow()",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/a_cv2_imshow_thread"
    },
    "split_keywords": [
        "opencv",
        "cv2",
        "imshow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92288eb4a6a86eb443ebcba34e24357224c80561007489023f0d4c7711316b1c",
                "md5": "79c26551d623a97aa9d85acec303e339",
                "sha256": "0d825fa887c2b3b1b91913163ef8e01d1a05d7914c0ef352b5584812d9cce637"
            },
            "downloads": -1,
            "filename": "a_cv2_imshow_thread-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79c26551d623a97aa9d85acec303e339",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5798,
            "upload_time": "2022-10-16T02:36:56",
            "upload_time_iso_8601": "2022-10-16T02:36:56.390143Z",
            "url": "https://files.pythonhosted.org/packages/92/28/8eb4a6a86eb443ebcba34e24357224c80561007489023f0d4c7711316b1c/a_cv2_imshow_thread-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e21e8fa7d9d85ebf6a26647a5b7f6e22d07eb50fa32a96661ab7ae152d606d5",
                "md5": "7a5dc400148e6706cc2d0d6e24c6de22",
                "sha256": "ae118a0135106af64ab4b5662d13693cae306da587223ff32abd4c9b62dff0e7"
            },
            "downloads": -1,
            "filename": "a_cv2_imshow_thread-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "7a5dc400148e6706cc2d0d6e24c6de22",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3794,
            "upload_time": "2022-10-16T02:36:57",
            "upload_time_iso_8601": "2022-10-16T02:36:57.914984Z",
            "url": "https://files.pythonhosted.org/packages/9e/21/e8fa7d9d85ebf6a26647a5b7f6e22d07eb50fa32a96661ab7ae152d606d5/a_cv2_imshow_thread-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-10-16 02:36:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "a_cv2_imshow_thread",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "opencv_python",
            "specs": []
        }
    ],
    "lcname": "a-cv2-imshow-thread"
}
        
Elapsed time: 2.90180s