{"id":14977715,"url":"https://github.com/jss95/cv2pyside6","last_synced_at":"2025-10-28T05:30:57.249Z","repository":{"id":38408674,"uuid":"442227542","full_name":"JSS95/cv2PySide6","owner":"JSS95","description":"Python package to display video in GUI using OpenCV-Python and PySide6","archived":false,"fork":false,"pushed_at":"2024-03-05T03:01:48.000Z","size":675,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T12:11:10.702Z","etag":null,"topics":["opencv","pyside6","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSS95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T17:28:33.000Z","updated_at":"2024-12-23T20:02:57.000Z","dependencies_parsed_at":"2024-09-18T22:08:57.427Z","dependency_job_id":"d5024244-f214-4682-a637-8d4b0b629a5d","html_url":"https://github.com/JSS95/cv2PySide6","commit_stats":{"total_commits":227,"total_committers":2,"mean_commits":113.5,"dds":0.08370044052863435,"last_synced_commit":"410f4bafedd2eeb383c4f9279c0df9b7308851c1"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSS95%2Fcv2PySide6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSS95%2Fcv2PySide6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSS95%2Fcv2PySide6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSS95%2Fcv2PySide6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSS95","download_url":"https://codeload.github.com/JSS95/cv2PySide6/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238603665,"owners_count":19499488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opencv","pyside6","python"],"created_at":"2024-09-24T13:56:11.489Z","updated_at":"2025-10-28T05:30:56.882Z","avatar_url":"https://github.com/JSS95.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cv2PySide6 = cv2 + PySide6\n\n## :warning: Deprecated\n\n[![Deprecated](https://img.shields.io/badge/deprecated-red)](https://github.com/JSS95/cv2PySide6)\n\nThe cv2PySide6 project is deprecated. Use [AraViQ6](https://pypi.org/project/araviq6/) instead.\n\n---\n\nPython package which combines [OpenCV-Python](https://pypi.org/project/opencv-python/) and [PySide6](https://pypi.org/project/PySide6/).\n\n## Introduction\n\n`PySide6` provides powerful tools to acquire video stream from file or device, and to display it on GUI.\n`cv2` is a de facto standard module for image analysis with Python.\nIt is natural to process the image with `cv2` and display it using `PySide6`.\n\n`cv2PySide6` is a package to help build the video frame pipeline for this purpose.\nIt provides the object to convert `PySide6.QVideoFrame` to `numpy.ndarray`, and widget to directly display the array.\n\n## Installation\n\nBefore you install, be careful for other Qt-dependent packages installed in your environment.\nFor example, non-headless `OpenCV-Python` modifies the Qt dependency thus making `PySide6` unavailable.\n\n`cv2PySide6` can be installed using `pip`.\n\n```\n$ pip install cv2PySide6\n```\n\n## How to use\n\nUser can construct a pipeline which converts `QVideoFrame` to `ndarray`, performs any desired processing and displays to the widget.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/JSS95/cv2PySide6/raw/master/doc/source/_images/pipeline.png\"/\u003e\u003cbr\u003e\n    Video display pipeline\n\u003c/div\u003e\n\n### `QVideoFrame` to `ndarray`\n\n`QVideoFrame` is acquired from media file (`PySide6.QMediaPlayer`) or camera capture session (`PySide6.QMediaCaptureSession`) by setting `PySide6.QVideoSink` to them and listening to `QVideoSink.videoFrameChanged` signal.\n\nTo convert it, pass the video frame `cv2PySide6.FrameToArrayConverter` and listen to `FrameToArrayConverter.arrayChanged` signal.\n\n\u003e (Note) If you want to convert a single `PySide6.QImage` to `ndarray`, [qimage2ndarray](https://pypi.org/project/qimage2ndarray/) package provides handy functions.\n\n### Displaying `ndarray`\n\n`cv2PySide6.NDArrayLabel` is a widget to directly display `ndarray`.\nIt can also scale the image with respect to the widget size, and user can select the scaling mode.\n\n### Convenience classes\n\nFor convenience, `cv2PySide6` provides `NDArrayVideoPlayer` and `NDArrayMediaCaptureSession` which inherits their `PySide6` counterparts and emits `arrayChanged` signal.\n`NDArrayVideoPlayerWidget` and `NDArrayCameraWidget` are the minimal implementation to display the video stream with them.\n\nHowever, time-consuming image processing will block the GUI with these classes because they use a single thread.\nTo build multithread pipeline, refer to the examples and build the pipeline yourself.\n\n## Examples\n\nUse cases with multithreading are provided in [examples](https://github.com/JSS95/cv2PySide6/tree/master/cv2PySide6/examples) directory.\nThey can be found in documentation as well.\n\n## Documentation\n\nDocumentation can be found on Read the Docs:\n\n\u003e https://cv2pyside6.readthedocs.io/\n\nIf you want to build the document yourself, clone the source code and install with `[doc]` option.\nGo to `doc` directory and build.\n\n```\n$ pip install cv2PySide6[doc]\n$ cd doc\n$ make html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjss95%2Fcv2pyside6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjss95%2Fcv2pyside6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjss95%2Fcv2pyside6/lists"}