OpenPTV - framework for particle tracking velocimetry
- Python 3.10 or newer
- CMake 3.15 or newer
- C compiler (gcc, clang, or MSVC)
- pip
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install build dependencies:
python -m pip install --upgrade pip
python -m pip install build numpy cython
- Build and install:
cd py_bind
python setup.py prepare
pip install -e .
- Verify installation:
pytest test/
The C library tests use the Check framework and can be run in several ways:
- Run all tests with debug output:
CK_FORK=no CK_VERBOSITY=verbose ctest -V
- Run a specific test (e.g., check_track) with debug output:
CK_FORK=no CK_VERBOSITY=verbose ctest -V -R check_track
- Run a single test case with maximum debug information:
CTEST_OUTPUT_ON_FAILURE=1 CK_FORK=no CK_VERBOSITY=verbose CK_RUN_CASE="test_single_particle_track" ctest --output-on-failure -VV -R check_track
Environment variables explained:
CK_FORK=no
: Prevents Check from forking processes, ensuring all output is visibleCK_VERBOSITY=verbose
: Enables verbose output from Check frameworkCK_RUN_CASE
: Specifies a single test case to runCTEST_OUTPUT_ON_FAILURE=1
: Shows output for failed tests
If you encounter build issues, clean the build artifacts and try again:
rm -rf build/
rm -rf *.egg-info/
rm -rf dist/
from optv.tracking_framebuf import Target
from optv.tracker import Tracker
from optv.calibration import Calibration
cd liboptv
mkdir build && cd build
cmake ../
sudo make install
make verify
Please consider donation to support our website and domain expenses and our developers during their job transitions.