Photogrammetry algorithms and pipelines¶
Standard algorithms¶
Pix4Dengine SDK provides access to the Pix4D photogrammetry algorithms, such as, camera calibration, point cloud densification, orthomosaic generation, and others. We call them standard algorithms. Each standard algorithm is available as a configurable callable object that can be executed for a given set of data called a project. A project is an on-disk representation of the data consumed and produced by the algorithms.
For example, getting and running the camera calibration, point cloud densification, and orthomosaic generation algorithms can be done in the following way:
from pix4dengine import create_project
from pix4dengine.algo import calib, dense, ortho
project = create_project("test", image_dir, work_dir=project_dir)
calib_algo = calib.make_algo()
calib_algo(project)
dense_algo = dense.make_algo()
dense_algo(project)
ortho_algo = ortho.make_algo()
ortho_algo(project)
The three algorithms are sequenced as shown in the example and act on the same set of data (project).
Algorithm pipeline¶
A more convenient way of sequencing algorithms and defining a project for the sequence is by using a pipeline. The previous example of running three standard algorithms can be modified to use a pipeline:
from pix4dengine import create_project
from pix4dengine.algo import calib, dense, ortho
from pix4dengine.pipeline import Pipeline
project = create_project("test", image_dir, work_dir=project_dir)
calib_algo = calib.make_algo()
dense_algo = dense.make_algo()
ortho_algo = ortho.make_algo()
pipeline = Pipeline(algos=(calib_algo, dense_algo, ortho_algo))
pipeline.run(project)
The following sections of the documentation give more detailed and advanced examples of creating pipelines, adding user-defined algorithms to pipelines, configuring algorithms, and setting input data or retrieving output data of a project.