qtcam
PyQt5 widget for OpenCV camera preview with multiple instantiation and real time image filtering.
This module contains the next classes:
CameraDevice: Manages image capture and emits a signal when a new frame is available.CameraWidget: Implements a Qt widget for camera image preview.Filters: Implements some basic image filters.
Installation
pip install qtcam
Usage
Simple preview widget
from PyQt5.QtWidgets import QApplication
from qtcam import CameraDevice, CameraWidget
app = QApplication([])
widget = CameraWidget(CameraDevice())
widget.show()
app.exec_()
Multiple widget instances with image filtering
from PyQt5.QtWidgets import QApplication
from qtcam import CameraDevice, CameraWidget, Filter
app = QApplication([])
device = CameraDevice()
widget_1 = CameraWidget(device)
widget_1.show()
widget_2 = CameraWidget(device)
widget_2.add_filter(Filter.gray)
widget_2.show()
app.exec_()
Custom filtering
import cv2
from PyQt5.QtWidgets import QApplication
from qtcam import CameraDevice, CameraWidget
def custom_filter(frame):
return cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
app = QApplication([])
widget = CameraWidget(CameraDevice())
widget.add_filter(custom_filter)
widget.show()
app.exec_()
Selecting another camera
Another camera can be selected by passing its index to CameraDevice (the default index is 0).
from qtcam import CameraDevice
device = CameraDevice(1)
Examples
- multiple_widgets.py: Multiple widget instances using some built-in filters.
- filter_tester.py: PyQt application using the widget to test all built-in filters.
Metadata
Release files for qtcam 1.0.0
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 | |
|---|---|---|---|---|
| qtcam-1.0.0.tar.gz | 15.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qtcam-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.8 kB
Release files / qtcam-1.0.0.tar.gz
| Download URL | qtcam-1.0.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08e15e7d694f21b597d3a5ac69d04e5c8f3f9718add87fef7d4f607ba488efe1
|
|
BLAKE2b-256 checksum How to use checksums |
cf380622dac74ffac5bfdb4085d53c2e58a6087e6f9093f1b8126f6e9c3fdb89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.13.1 Linux/6.8.0-1020-azure
|
Release files / qtcam-1.0.0-py3-none-any.whl
| Download URL | qtcam-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0273e50963492a254d44ba037c0a099f7a0ee2000c1947cf4278a8690fab1ec
|
|
BLAKE2b-256 checksum How to use checksums |
6348969a550398d5c278d97a0a481bbc97e6e23fede06ed94bd23ce74bf82c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.13.1 Linux/6.8.0-1020-azure
|
Security for qtcam 1.0.0
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.