pyPhase is a python wrapper package over I3DR's Phase C++ library.
Install pyPhase from pypi using pip:
pip install phase
Install dependencies
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt install -y libgl-dev liblapack-dev libblas-dev libgtk2.0-dev
sudo apt install -y libgstreamer1.0-0 libgstreamer-plugins-base1.0-0
sudo apt install -y zlib1g libstdc++6
sudo apt install -y libc6 libgcc1
Package is not yet available on pypi for Linux.
Please download the wheel for your version of python from the release and install using:
pip install ./phase-X.X.X-cpXXX-cpXXX-linux_x86_64.whl
Phase library is required to be installed for use in the build process.
Download debian package from v0.3.0 release.
Install debian package using apt package manager:
sudo apt install -f ./phase_vx.x.x-amd64.deb
This should install to /opt/i3dr/phase
Download Windows installer from the v0.3.0 release.
Install using the installer GUI, this should install to C:\Program Files\i3DR\Phase
The following libraries are used to build pyPhase:
CMake dependencies are included automatically in the cmake build process.
Python requirements for building pyPhase can be install using the following command:
pip install -r requirements.txt
sudo apt-get install doxygen patchelf
Download and install doxygen from here
Build pyPhase bindings using CMake:
mkdir build
cd build
# [windows]
cmake -G "Visual Studio 16 2019" -A x64 -DPhase_DIR="C:\Program Files\i3DR\Phase\lib\cmake" ..
cmake --build . --config Release
# [linux]
cmake -DPhase_DIR="/opt/i3dr/phase/lib/cmake" ..
make -j$(nproc)
Note: Make sure to run this from the repository root directory
Run unit tests using pytest by running the following commands:
cd build/lib
python3 -m pytest ../../test/unit/
Note: Make sure to run this from the repository root directory
Run performance tests using pytest by running the following commands:
cd build/lib
python3 -m pytest ../../test/perf/
Note: Make sure to run this from the repository root directory
export PYTHONPATH=./build/lib
python3 test/demo/demo_calibrate_from_images.py
python3 test/demo/demo_generate_pointcloud.py
python3 test/demo/demo_list_cameras.py
python3 test/demo/demo_read.py
python3 test/demo/demo_read_thread.py
python3 test/demo/demo_match.py
python3 test/demo/demo_match_thread.py
python3 test/demo/demo_titania_read.py
Note: Make sure to run this from the repository root directory
Documentation is generated and deployed in GitHub actions, however, to test documentation generation locally, run the following commands:
./docs/gen_docs.sh
Deployment is handelled by GitHub actions, however, to test deployment locally, use the following command:
export PYTHONPATH=./build/lib
python3 setup.py bdist_wheel --dist-dir="deployment"