Processing large projects with Pix4Dengine Server

 
Warning: This article does not refer to the newest version of Pix4Dengine Server 0.1.0 released in November 2018. To get access to the latest documentation please visit Pix4Dengine Server SDK.

This article shows how to process large format datasets with Pix4Dengine Server. In practice, it is ideal to plan out large projects before the capture process to ensure as highly streamlined and successful workflow as possible. There are two main project types, each requires different handling:

 
Note: A Pix4Dengine Server License is required to process automatically using the command line interface. To purchase one, please contact us.
 

With GCPs:

Currently, projects that contain GCPs require manual handling for marking images and ensuring accuracy.

The main focus of larger projects should be parsing the project down into manageable chunks that can be eventually merged. It is recommended that individual projects should be no larger than 2000 images or that the amount of images is suited to the hardware available.
GCPs or MTPs should be planned to lie in overlap zones between different image sets and flights. Currently merging can only be done manually using Pix4Dengine Server as there are no command line arguments to merge projects (due to the fact that GCPs and MTPs are required and must be marked manually).

In order to process large datasets with Pix4Dengine Server:

1. Separate images into manageable blocks:

  • Option 1: Plan multiple overlapping flights.
    Sectioning out the project in the flight planning is the easiest way to partition the overall project. Smaller individual sections will process faster than one single large project. It is recommended that at least two GCPs be placed in the areas of overlap where the partitioned subprojects will eventually be joined.
  • Option 2: Separate images by file creation time.
    This option is for when pre-flight planning is unavailable or the large project must be flown all at once. Generally one can use the time of file creation to determine sections of images that are related. For example, one could set the first subproject to be images 1-1000, the second to be images 900-1900, the third to be images 1800-2800, etc. A level of overlap from subproject must be maintained for the later merge to be successful.

2. Create .p4d files for each subproject by looping through each image directory:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> --template <template_file> <project_file>
or
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> <project_file>

3. Process each subproject through Step 1.

 
Example:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -i "D:\Project1\subproject1.p4d"
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -i "D:\Project1\subproject2.p4d"
...

4. Load ground control points or manual tie points (GCPs/MTPs) manually in the GUI:
The process for adding GCPs/MTPs from a file can be found here: 202560039, while the process for manually marking GCPs/MTPs can be referenced here: 202560109.

5. Use the subprojects in creating a merged .p4d file: 202558529

6. Process the new merged.p4d file through the remaining two steps.

 
Example:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -d -o "D:\Project1\subproject1.p4d"

Without GCPs

If a project does not require GCP interaction it can be processed fully automatically with some specialized programming.

Favoring time over accuracy

1. Sectioning the project before processing: The most time effective way to utilize Pix4D via the command line is to split the project into more manageable blocks for the hardware.

  • Option 1: Plan multiple overlapping flights.
    Sectioning out the project in the flight planning is the easiest way to partition the overall project. Smaller individual sections will process faster than one single large project. It is recommended that at least two GCPs be placed in the areas of overlap where the partitioned subprojects will eventually be joined.
  • Option 2: Separate images by file creation time.
    This option is for when pre-flight planning is unavailable or the large project must be flown all at once. Generally one can use the time of file creation to determine sections of images that are related. For example, one could set the first subproject to be images 1-1000, the second to be images 900-1900, the third to be images 1800-2800, etc. A level of overlap from subproject must be maintained for the later merge to be successful.

2. Create project files for each set of images:
If there is a specific template to apply before processing, create a new Pix4D project using:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> --template <template_file> <project_file>
otherwise:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> <project_file>

3. Run the subprojects for all steps: 
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -r <project_file>

After running all portions of the greater project the outputs can be merged using other postprocessing software such has GDAL.

Favoring accuracy over time:

 
Note: This process is likely to involve heavy scripting to copy and edit .p4d project files before processing.
This process can be riskier due to the larger hardware requirements imposed by processing all the images at once during the initial phase. This process will utilize Pix4D's processing area function to produce the most accurate results section by section. A boundary file KML or KMZ with four corners is needed.

1. Create a new Pix4D project. If there is a specific template to apply before processing, create a new Pix4D project using:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> --template <template_file> <project_file>
otherwise:
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -n --image-dir <image_directory> <project_file>

2. Process Step 1 with all images of the large project.

 
Example: "C:\Program Files\Pix4Dmapper\pix4dmapper" -c -i "D:\Project\largeproject.p4d"

3. Once Step 1 has completed the project file must be duplicated to partition the project:
Using scripting methods, one should copy the project file however many times one wishes to partition the project. The .p4d file is effectively an XML document containing the project area and can be edited with most common programming languages.
The area of interest in the file is this section:
<processingArea>
     <geoCoord2D x="312978.66118643" y="5154376.965688433"/>
     <geoCoord2D x="312978.117330892" y="5154341.216678394"/>
     <geoCoord2D x="312939.979279067" y="5154341.70726983"/>
     <geoCoord2D x="312942.866226013" y="5154379.047594546"/>
     <z zMin="130.1203951143" zMax="354.9494048754"/>
</processingArea>

Edit the boundary points in each of the copied .p4d file to cover a percentage of the overall project. It is necessary to ensure there is enough overlap between each section so it is easier to merge outputs in post-processing.

4. Run Steps 2 and 3 for each subproject.

 
Example: 
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -d -o "D:\Project1\subproject1.p4d"
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -d -o "D:\Project1\subproject2.p4d"
...

5. Merge the outputs in a post-processing utility such as GDAL.

 

Was this article helpful?
0 out of 0 found this helpful

Article feedback (for troubleshooting, post here)

0 comments

Article is closed for comments.