PyQt-based framework for integrating video cameras into research applications
Project description
QVideo: Qt framework for video cameras
QVideo is a framework for integrating video cameras into Qt projects (PyQt5, PyQt6, or PySide) for scientific research. It provides a unified, registration-based property system so that every camera backend — USB webcams, GenICam devices, FLIR cameras, Raspberry Pi cameras — is controlled through the same API. Property trees, display widgets, and a digital video recorder are built on top of that abstraction and require no camera-specific code.
Features
- Unified camera API —
QCamerasubclasses expose adjustable parameters viaregisterProperty/registerMethod; UI and recording layers consume them without knowing the underlying hardware. - Auto-built property trees —
QCameraTreereads the registered property map and builds apyqtgraphparameter tree widget automatically. - Threaded video source —
QVideoSourcewraps any camera in aQThreadand emitsnewFrame(ndarray)at acquisition rate. - Composable filter pipeline —
VideoFilter/QFilterBanksit between source and display; filters include blur, edge detection, RGB channel selection, sample-and-hold, and statistical median variants. - Digital video recorder — lossless HDF5 (with timestamps) and OpenCV
video formats;
QDVRWidgetis the composite UI widget. - Live display —
QVideoScreensupports mouse-aware graphical overlays for annotations, regions of interest, and user interaction.
Installation
pip install QVideo
Optional hardware backends
| Backend | Extra | Notes |
|---|---|---|
| GenICam cameras (Vimba, etc.) | pip install QVideo[genicam] |
Requires a vendor-supplied .cti producer file |
| Raspberry Pi camera | pip install QVideo[picamera] |
Requires picamera2 |
Quick start
import pyqtgraph as pg
from QVideo.cameras.Noise import QNoiseSource
from QVideo.lib import QVideoScreen
pg.mkQApp()
source = QNoiseSource() # synthetic noise — no hardware needed
screen = QVideoScreen()
source.newFrame.connect(screen.setImage)
screen.show()
source.start()
pg.exec()
Replace QNoiseSource with QOpenCVSource, QGenicamSource, etc. to switch
hardware — the rest of the code is identical.
Camera backends
| Backend | Class | Hardware |
|---|---|---|
cameras/Noise |
QNoiseCamera |
Synthetic — no hardware required |
cameras/OpenCV |
QOpenCVCamera |
USB webcams via OpenCV |
cameras/Genicam |
QGenicamCamera |
Abstract base for all GenICam/GigE Vision cameras |
cameras/Flir |
QFlirCamera |
FLIR cameras via GenICam (Spinnaker GenTL producer) |
cameras/Basler |
QBaslerCamera |
Basler cameras via GenICam (pylon GenTL producer) |
cameras/IDS |
QIDSCamera |
IDS Imaging cameras via GenICam |
cameras/MV |
QMVCamera |
Any GenICam camera via MATRIX VISION mvGenTLProducer |
cameras/Vimbax |
QVimbaXCamera |
Allied Vision cameras via VimbaX GenTL producer |
cameras/Picamera |
QPicamera |
Raspberry Pi camera module |
Writing a new camera backend
Subclass QCamera and implement three methods:
from QVideo.lib import QCamera
class MyCamera(QCamera):
def _initialize(self) -> bool:
self.device = open_my_hardware()
if not self.device:
return False
self.registerProperty('exposure',
getter=lambda: self.device.get_exposure(),
setter=lambda v: self.device.set_exposure(v),
ptype=float)
return True
def _deinitialize(self) -> None:
self.device.close()
def read(self):
ok, frame = self.device.read_frame()
return ok, frame
QCameraTree and QVideoSource work with MyCamera immediately — no
additional code needed.
Acknowledgements
Work on this project at New York University is supported by the National Science Foundation of the United States under award number DMR-2428983 and by an award from the TAC Program of New York University.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qvideo-3.6.4.tar.gz.
File metadata
- Download URL: qvideo-3.6.4.tar.gz
- Upload date:
- Size: 165.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03b6ede6d354dde28f0d2babd03739179c0f1ced627c11ca2ca95202237beb1d
|
|
| MD5 |
17ca0efc17e9d381667155c64ee8bb66
|
|
| BLAKE2b-256 |
b215b17611178321ff22e937383a5332f92bb2dd6738aa673c76efdc2e21c513
|
Provenance
The following attestation bundles were made for qvideo-3.6.4.tar.gz:
Publisher:
publish.yml on davidgrier/QVideo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qvideo-3.6.4.tar.gz -
Subject digest:
03b6ede6d354dde28f0d2babd03739179c0f1ced627c11ca2ca95202237beb1d - Sigstore transparency entry: 1219330469
- Sigstore integration time:
-
Permalink:
davidgrier/QVideo@5914400c1cbe5b81a8dc8874dc199b8a30280c16 -
Branch / Tag:
refs/tags/v3.6.4 - Owner: https://github.com/davidgrier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5914400c1cbe5b81a8dc8874dc199b8a30280c16 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qvideo-3.6.4-py3-none-any.whl.
File metadata
- Download URL: qvideo-3.6.4-py3-none-any.whl
- Upload date:
- Size: 133.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eff93b016bb6c072a5947852d2d9578ac71e27e2fe9dc2f8321efb354593e08
|
|
| MD5 |
2beabf8d2469b3f0a73778376849af31
|
|
| BLAKE2b-256 |
48949805e4a7ec83c8b0b214d72dd3ff75c79beceffe1a957208fea2d457b31f
|
Provenance
The following attestation bundles were made for qvideo-3.6.4-py3-none-any.whl:
Publisher:
publish.yml on davidgrier/QVideo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qvideo-3.6.4-py3-none-any.whl -
Subject digest:
6eff93b016bb6c072a5947852d2d9578ac71e27e2fe9dc2f8321efb354593e08 - Sigstore transparency entry: 1219330472
- Sigstore integration time:
-
Permalink:
davidgrier/QVideo@5914400c1cbe5b81a8dc8874dc199b8a30280c16 -
Branch / Tag:
refs/tags/v3.6.4 - Owner: https://github.com/davidgrier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5914400c1cbe5b81a8dc8874dc199b8a30280c16 -
Trigger Event:
push
-
Statement type: