The use of the Pix4Dengine requires some familiarity with the Python programming language.
Pix4Dengine is developed and tested for use on the 64bit versions of Windows 2016, Windows 10 or Ubuntu Linux. For Ubuntu, only version 14.04 is currently officially supported by Pix4Dmapper 4.3.
A working Python 3.6 or 3.7 environment¶
A working Python 3.6 or 3.7 installation is required. To check which version of Python is available on your machine, run the command:
Please check the Python download page for installing a specific Python version.
Note that Python can be available on the command line as
depending on the operating system and on the Python distribution in use. A similar remark holds
for the Python package manager
pip3.6). For the rest of this section
we assume both commands are available without any version suffix.
You can check your
pip installation by running:
If this command fails, you can try to install
pip by running the following command:
python -m ensurepip --default-pip
If this fails, please check the Python documentation.
A working installation of Pix4Dmapper¶
A working installation of the Pix4Dmapper with the Enterprise license is needed to use the
Pix4Dengine. The use of Pix4Dmapper version 4.3.27 or higher is encouraged.
A Pix4Dmapper installation includes the
pix4dmapper executable, or the
pix4dmapper.exe executable on a Windows machine. For more information, please refer to the
Pix4D web site or contact Pix4D support.
Pix4Dengine can be installed from the
.whl file, which can be downloaded from the
Pix4Dengine download page.
A system-wide installation is performed simply by running the following command:
pip install pix4dengine-0.1.0-py3-none-any.whl
This generally requires administrator rights, and makes Pix4Dengine available to all users on a machine. In order to install the software only for the current user, add the
--user option to
Basic usage of the Pix4Dengine Python SDK¶
The code sample below shows the simplest case of processing using Pix4Dengine. The code ensures Pix4Dmapper is authorised by Pix4D license server, creates a project with default parameters and calibrates the cameras in the project. The calibration quality report is then loaded, and the quality status summary is printed.
from pix4dengine.enginewrapper import EngineWrapper from pix4dengine import create_project, process_project from pix4dengine.constants.processing import ProcessingStep from pix4dengine.exports import get_report engine_wrapper = EngineWrapper() # Acquire the authorization to use Pix4Dmapper from the Pix4D licensing system if not engine_wrapper.is_logged_in(): engine_wrapper.login(<youremail>, <yourpassword>) # Create a project project = create_project("test_survey", engine_wrapper=engine_wrapper, images_dir="/path/to/images") # Calibrate the cameras in the project process_project(project, engine_wrapper, steps=ProcessingStep.CALIB) # Access the calibration quality report quality_report = get_report(project) print(quality_report.calibration_quality_status())
Note that in this example
EngineWrapper assumes that the
Pix4Dmapper executable was either installed in its default location, or that the path to the
executable was configured beforehand. See
pix4dengine.settings for how to