No project description provided
Project description
Acquire
python -m pip install acquire-imaging
Acquire (acquire-imaging
on PyPI) provides high-speed, multi-camera, video streaming for up to 2 cameras and image acquisition with a programming interface for streaming video data directly to Python, cloud-friendly file formats, and visualization platforms, such as napari.
Note This is an early stage project. If you find it interesting, please reach out!
Acquire supports the following cameras (currently only on Windows):
- Hamamatsu Orca Fusion BT (C15440-20UP)
- Vieworks VC-151MX-M6H00
- FLIR Blackfly USB3 (BFLY-U3-23S6M-C)
- FLIR Oryx 10GigE (ORX-10GS-51S5M-C)
Acquire also supports the following output file formats:
For testing and demonstration purposes, Acquire provides a few simulated video sources.
Usage
Check out our documentation here.
The provided napari plugin (code here) is a good example of how to stream for visualization.
Development
We welcome contributors. The following will help you get started building the code.
Environment
Requires
- CMake 3.23+ (download page or via chocolatey)
- A C++20 compiler (Microsoft Visual Studio Community download page, or clang)
- Rust (via rustup, see install page)
- conda (optional; via miniconda)
- libclang >= v5.0 (on windows via choco
choco install llvm
or, on osx, via brewbrew install llvm
)
It's strongly recommended you create a python environment for development
conda create --name acquire python=3.11
conda activate acquire
Build
conda activate acquire
git submodule update --init --recursive
pip install maturin
maturin build -i python
Important When updating the 'acquire-video-runtime' (the c api), you need to manually trigger
a rebuild by touching wrapper.h
.
git submodule update # updates acquire-video-runtime
touch wrapper.h # will trigger a rebuild
python -m build
This package depends on a submodule (acquire-video-runtime) and binaries from the following Acquire drivers:
- acquire-driver-common
- acquire-driver-hdcam
- acquire-driver-egrabber
- acquire-driver-zarr
- acquire-driver-spinnaker
The build script will automatically try to fetch the binaries from GitHub releases.
In order to configure which release of each driver to use, you can set the value in drivers.json
:
{
"acquire-driver-common": "0.1.0",
"acquire-driver-hdcam": "0.1.0",
"acquire-driver-egrabber": "0.1.0",
"acquire-driver-zarr": "0.1.0",
"acquire-driver-spinnaker": "0.1.0"
}
These values can be set to a specific version, or to nightly
for nightly builds.
Develop
pip install -e ".[testing]"
pytest -s --tb=short --log-cli-level=0
This project uses pre-commit
to run required
checks as git hooks.
pip install pre-commit
pre-commit install
Troubleshooting
Maturin can't find a python interpreter
Maturin
is a command line tool associated with
pyo3
. It helps automate the build and packaging
process. It's invoked by setuptools
during a build.
- Double-check you've activated the right conda environment.
- Try
maturin build -i python
This seems to happen on windows in anaconda environments when multiple python interpreters are available on the path.
It seems to happen less frequently when invoked via pip - pip install -e .
will end up invoking maturin.
Working with an editable install, how do I update the build?
It depends on what you changed:
- acquire-video-runtime (c/c++ code):
touch wrapper.h; maturin develop
- rust code:
maturin develop
Zarr V3 tests are failing
You should make sure that the following environment variables are set:
ZARR_V3_EXPERIMENTAL_API: 1
ZARR_V3_SHARDING: 1
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 Distributions
Built Distributions
Hashes for acquire_imaging-0.3.0rc1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38c374f34b45d7943e2ba842fe479110bea3e263b9f3d53d88900dc03a659790 |
|
MD5 | 3e20fcc4108741fd3af3c1b518984722 |
|
BLAKE2b-256 | a0bc353aa64bd83b5f0f5f7065bc31476735e8e9d49d81bd06e51dac997b2bf0 |
Hashes for acquire_imaging-0.3.0rc1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 214d1979c088cadd845d38116fee3cfd77b905a1ffd63202a55e76b97dc479bc |
|
MD5 | 25726695be7fe0668b782ed798bcb3aa |
|
BLAKE2b-256 | 6f3913736081676f7e2e7e011072cc4882eeb772d8ea9d494f3d8c51aa9c3ee9 |
Hashes for acquire_imaging-0.3.0rc1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb2689d075dcfc7a67dcd51eeb7a2ff162b7c7d88a4cf4704ec92f07e43f4ff |
|
MD5 | 8bfd4b5c7890f91b052714981bf76fa2 |
|
BLAKE2b-256 | 528fc4f809adcec95ef308f6976d94dd35e5349e9b2b366a2c54126cc09103a1 |