📷📷📷 MULTIWEBCAM 📷📷📷
Synchronized webcam recording to bootstrap low-cost/early-stage computer vision projects
Introduction
I needed a way to record synchronized video while prototyping a computer vision project (pyxy3D). Extreme temporal and spatial precision were less important than getting something reasonable with a minimal budget. When conscientiously managed, USB webcams controlled via OpenCV can perform surprisingly well at this task. I have spun this functionality off into its own package to create a clear separation of concerns between data capture and data processing, while hopefully creating a simpler package that others might find useful.
If MultiWebCam (MWC) is close to what you need but not quite, please feel free to raise an issue and I'll see if I can incorporate your use case. These are the core functions that are currently implemented:
- Record synchronized frames from multiple webcams
- Record from single webcams to pull single camera calibration video.
- synchronize in real time to understand dropped frame rate
- include frame-by-frame time stamp history to facilitate off-line processing
- easy adjustment of the following parameters:
- resolution
- exposure
- target fps
Quick Start
Basic pip install
You can install MWC into your python environment with pip install multiwebcam and then launch it from the command line with
mwc
Note that this has primarily been tested on Windows 10, infrequently on MacOS, and will not work on Linux as far as I can tell ☹️. If someone is familiar with getting USB cameras working through OpenCV on Linux, I'm all ears.
Editable Install Using Poetry
If you prefer to contribute to MWC or want to install it in editable mode, follow these steps using Poetry:
Clone the Repository:
git clone https://github.com/mprib/multiwebcam.git
cd multiwebcam
Install Poetry:
pip install poetry
Set Up the Environment:
poetry install
By running poetry install, you'll install all dependencies and also set up the multiwebcam package in editable mode. Any changes you make to the code will be reflected in your environment.
Capturing Data
Launch MultiWebCam from the command line:
mwc
Once you've launched MultiWebCam, choose a new project directory through the File menu. Make sure that the USB cameras you want to use are currently plugged in when you launch the new session.
MWC will attempt to connect to the cameras currently and will create a recording_config.toml file in the project directory.
From the Mode menu you can select single camera to change camera settings (such as resolution and exposure). On the MultCamera mode you can set the target fps to achieve a desired dropped frame rate and record batches of videos.
Metadata
Release files for multiwebcam 0.1.2
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 | |
|---|---|---|---|---|
| multiwebcam-0.1.2.tar.gz | 1.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| multiwebcam-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / multiwebcam-0.1.2.tar.gz
| Download URL | multiwebcam-0.1.2.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9ada8a298f7a6d5d88b164560018c056c71e5b6876a7f88c1b64ec909ef0542
|
|
BLAKE2b-256 checksum How to use checksums |
684b56773a221a210b9e2151c4b51cf22f5bf98e3f3947a8aefcf6c251f5b483
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.6 Windows/10
|
Release files / multiwebcam-0.1.2-py3-none-any.whl
| Download URL | multiwebcam-0.1.2-py3-none-any.whl |
|---|---|
| Size | 985.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
836f34f567da3cd7d250b69cb8acd14933e9c00eccd265ef1ff8ae4373a5720e
|
|
BLAKE2b-256 checksum How to use checksums |
7be0544d28ed14a5b48b39a89b54be162c8e21936b632630874e9f6fbb88794f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.6 Windows/10
|
Security for multiwebcam 0.1.2
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.