Importing a Pix4D Project Into Vr Aerial Triangulation (VrAirTrig)
This document explains the work flow for importing data from Pix4D into VrAirTrig.
There are at least two reasons that users may wish to rerun a Pix4D block in VrAirTrig.
1. The VR Bundle adjustment provides detailed reports and comprehensive weighting parameters.
2. In order to compensate for the imperfect Pix4D camera model export.
Item two requires a bit more explanation. The Pix4D camera distortion model appears to represented internally by an irregular grid, and they do not export enough data to replicate it. The polynomial approximations of the grid that they export are sufficient to set approximate models from their EOs, but not sufficient for mapping. Hence, in order to set models directly from the Pix4D solution users must export distortion corrected images from Pix4D and set models using the distortion corrected images and the imported Pix4D camera file (with the radial distortions disabled). Alternatively, they can follow this procedure to rerun the bundle.
The 'New Project' command is located in the 'Project' window on the main title bar. After choosing a file name and location the project edit/setup wizard will open.
To create a new VR camera file from the Pix4D camera click on the 'New Camera' button on the 'Cameras and Photos' tab of the project wizard. A Camera Edit dialog will open. Click the Import Camera Data button near the top left. Change the file type to Pix4D (using the combo box near the bottom right). Navigate to the file (the file name format is *pix4d_calibrated_internal_camera_parameters.txt). A fully functional camera definition will be imported, but a description can be added for convenience.
To see the imported (and scaled) distortion coefficients click on the 'Edit Radial Distortions' button near the bottom right of the camera edit dialog. You'll notice that the 'Adjustment mode' has been set to 'Polynomial'. The actual polynomials can be seen by clicking on the 'Polynomial Parameters' button.
Upon clicking 'OK' to exit the camera edit window, you'll be prompted to choose a file name for the new camera file.
Full documentation for the camera edit dialog is located here.
To add images to project click on the name of camera the images will be assigned to in the left table of the 'Cameras and Photos' tab of the project wizard. When a single camera is selected the 'Assign Photos to Camera' button on the bottom left becomes active. Click this button and navigate to choose the images.
On the 'Orientations and Control' tab of the project wizard the 'Control File' button is used to select ground control file. The control file can be file formatted as follows:
PtName1 X Y Z
PtName2 X Y Z
PtName3 X Y Z
The Vr Mapping software adds some default header information when it saves the file.
# Coordinate File
# Layout - Field Order Min number of fields
# 0 NAME X Y Z CX CY CZ 3
# 1 NAME Y X Z CY CX CZ 3
# 2 X Y Z NAME CX CY CZ 4
# 3 Y X Z NAME CY CX CZ 4
# 4 NAME X Y Z 3
# 5 NAME Y X Z 3
# 6 X Y Z NAME 4
# 7 Y X Z NAME 4
# 8 X Y NAME 3
# 9 Y X NAME 3
# Format - Coordinate format
# 0 State plane
# 1 UTM
# 2 Geographic Decimal Degrees
# SpZone - State plane zone
# Datum - Datum
# 0 NAD1927
# 1 NAD1983
# UtmZone - UTM Zone
# 1-60 Utm zone number
# Units - Coordinate units
# 0 Us Foot
# 1 International Foot
# 2 Meters
5 1862600.861000 724626.555000 807.1600
14 1862956.537000 726104.024000 810.4900
27 1862097.709000 729995.080000 793.1600
29 1865529.981000 731805.394000 808.5700
30 1861813.412000 731226.056000 794.1000
103 1875804.906000 722601.108000 894.5390
104 1876434.487000 726668.853000 899.2450
107 1868807.915000 727037.911000 797.9120
110 1873497.612000 726632.340000 912.9600
227 1863885.554000 727376.236000 810.9500
528 1864669.954000 723806.413000 816.2600
To import the Pix4D camera positions and orientations (EOs) click on the 'Import EOs' button on the 'Orientations and Control' tab of the project wizard. A windows browse dialog will be opened. Select the Pix4D file type from the combo box on the bottom right of the window and then navigate to the file. A message box will appear that lists how many of the images were correctly read from the input file. The entries in the table under the heading 'Exterior' will also change to 'Yes' indicating that an image has an exterior orientation (EO). See 'Import, Exterior Orientations' for more general EO importing information.
At this point, images have fully defined orientations and it can be determined if control points project into the images. The number of control points that project into each images is listed in the table under the heading 'Ctl Pts'. The entries in the table are sortable by the values in each column. To sort them by the number of control points, click on the 'Ctl Pts' header (It may be necessary to click it twice to sort the image in descending order by the number of control point). Double clicking on non-zero values in the 'Ctl Pts' column will allow you to view thumb nails of the control points in the images that they project into. Viewing some of these thumbnails is a good way to verify that the control, camera definition, and image orientations have been oriented successfully.
The Pix4D image measurements are importing by selecting 'Import Measures' from the import menu on the main command ribbon.
A dialog will be displayed which allow the setting of the At Measurement Import Parameters.
Point name prefix - Optionally add a prefix to all NON CONTROL point names. For this reason it is essential to define the control point file before running this import. Adding the default "AT0_" to the point names causes the software to see the imported points as automatic tie points. Automatic tie points can be winnowed, deleted, etc. more easily than points that the software believes are manual measurements.
Point name postfix - Optional post fix to all NON CONTROL point names. For this reason it is essential to define the control point file before running this import.
Overwrite existing points - If checked all previous image points will be deleted.
Remove GCP_ point name prefix - Pix4D adds this prefix to control point measurements in its tie point files. It is usually convenient to remove it so that the point names in the tie point file will match those in the control file. This option is only available when importing in Pix4D and Bingo formats.
Run the bundle adjustment from the 'Adjust' menu on the main control ribbon. There is no need to open layout, or view images, or anything else.
There will be a prompt for user parameters and after iterating the bundle final tweaking window will open.