Customize Import Formats
Some import formats can be customized according to your specific requirements and preferences. For instance, if you need to import additional information, your file contains arbitrary columns, or your data is not in the correct format, you can edit the following imports: control points, ground control points, distance definitions, and flight logs.
To customize these imports, you will need to edit the corresponding files in the installation directory. If the installation destination was not changed during setup, you can find them here:
C:\Program Files\Capturing Reality\RealityCapture
Import File Structure
Each import file has the same structure which makes the customization easier.
<format id="" descID="" desc="Text Displayed in the Import Dialog" reader="">
<parser allowedSeparators="" comment="" showIgnoreFirstline="" qualifiers="">
<Variable index="" format=""/>
</parser>
</format>
- <format> Defines the parameters of the import.
- id (optional) A unique identification number (GUID).
- descID (optional) A unique internal identification number for language localization.
- desc The name of the file format displayed in the import dialog.
- reader A file reader. We recommend using the same one as the existing formats in the file.
- <parser> Defines how the file is read.
- separator Symbols that will be used as delimiters (e.g., comma "," or space " ").
- allowedSeparators The list of separators displayed in the import dialog. The separator is automatically detected from a file or can be chosen manually by the user. If the allowed separators are not defined, the symbols specified in the separator parameter are used.
- comment Symbols that define a comment in a file. All text in the line written after one of these symbols will be ignored.
- showIgnoreFirstline Set to true or false whether you want to display an option to ignore the first line in the import dialog. When set to true, the option will be displayed.
- qualifier Symbols that can be around the values, e.g. double qoutes. This is helpful when values can have the same characters defines as the separators. We recommend using the same symbols as the existing formats in the file.
- <Variable> A type of imported value. Available variables are dependent on the chosen reader. You can see the list of available variables for importing control points, ground control points, distance definitions and flight logs in the corresponding paragraphs below.
- index Defines the number of the column with the specific value. The counting start from a zero (0). This can be used to skip unecessary columns.
- format Data type of the imported value. Supported types are: value – exact number, degrees – value in degrees (e.g. for GPS values N65 23 12.1 ), name – string (e.g. name of a control point), name.ext – file path and name including extension (e.g. IMG_0001.jpg).
Distance Definitions
Modify the "distancedefinitions.xml" file to customize the distance definitions import. As a reader use "CapturingReality.Import.CsvDistanceDefinition".
Sample file format:
<format id="{08192FC0-A5D9-4E99-B993-F274EFA5745F}" descID="8413" desc="Name, Point A, Point B, Distance, Accuracy (character-separated)" reader="CapturingReality.Import.CsvDistanceDefinition">
<parser allowedSeparators=",; &tab;" comment="#" showIgnoreFirstline="true" qualifiers=""optional" >
<Name index="0"/>
<PointA index="1"/>
<PointB index="2"/>
<Distance index="3"/>
<DistanceAccuracy index="4"/>
</parser>
</format>
Available variables:
- Name Distance constraint's name.
- PointA Name of the first point defining the distance constraint.
- PointB Name of the second point defining the distance constraint.
- Distance Length of the distance constraint.
- DistanceAccuracy Prior accuracy of the defined distance.
Control Points
Modify the "measurementsimport.xml" file to customize the control points import. As a reader use "CapturingReality.Import.CSVControlPointsMeasurements".
Sample file format:
<format id="{FDB5E38A-823C-446A-B144-6D33B2172D8A}" descID="8388" desc="Image, Point, X, Y (character-separated)" reader="CapturingReality.Import.CSVControlPointsMeasurements">
<parser allowedSeparators=",; &tab;" comment="#" showIgnoreFirstline="true" qualifiers=""optional" >
<Image index="0" format="name" />
<PointName index="1" />
<X index="2" />
<Y index="3" />
</parser>
</format>
Available variables:
- Image Image name, including the path and the format extension.
- PointName Name of the control point.
- X Position of the control point in the image on the X-axis in pixels from the upper left corner of the image.
- Y Position of the control point in the image on the Y-axis in pixels from the upper left corner of the image.
- XAccuracy Position accuracy on the X-axis.
- YAccuracy Position accuracy on the Y-axis.
- RotationAccuracy Rotation of the accuracy region from the X-axis in a left-handed system.
Ground Control Points
Modify the "groundcontrol.xml" file to customize the control points import. As a reader use "CapturingReality.Import.CSVGroundControl".
Sample file format:
<format id="{28626CC0-6311-41FD-88EE-988A673A5CB8}" descID="8406" desc="Name, X (East), Y (North), Alt, X Accuracy, Y Accuracy, Alt Accuracy (character-separated)" reader="CapturingReality.Import.CSVGroundControl">
<parser allowedSeparators=",; &tab;" comment="#;" showIgnoreFirstline="true" qualifiers=""optional">
<Name index="0" format="name"/>
<X index="1" format="value"/>
<Y index="2" format="value"/>
<Altitude index="3" format="value"/>
<XAccuracy index="4" format="value"/>
<YAccuracy index="5" format="value"/>
<AltitudeAccuracy index="6" format="value"/>
</parser>
</format>
Available variables:
- Name Name of the ground control point.
- Longitude Longitude coordinate of the ground control point.
- LongitudeAccuracy Position accuracy of the longitude coordinate.
- X Coordinate X of the ground control point.
- XAccuracy Position accuracy of the X coordinate.
- Latitude Latitude coordinate of the ground control point.
- LatitudeAccuracy Position accuracy of the latitude coordinate.
- Y Coordinate Y of the ground control point.
- YAccuracy Position accuracy of the Y coordinate.
- Altitude Altitude (Z) coordinate of the ground control point.
- AltitudeAccuracy Position accuracy of the altitude (Z) coordinate.
Flight Log
Modify the "flightlogs.xml" file to customize the control points import. As a reader use "CapturingReality.Import.CSVFlightLog".
Sample file format:
<format id="{97F08A22-F231-4AB4-A2FD-6FA42BB6D663}" descID="8436" desc="Name, X (East), Y (North), Alt, X Accuracy, Y Accuracy, Alt Accuracy, Yaw, Pitch, Roll (character-separated)" reader="CapturingReality.Import.CSVFlightLog">
<parser allowedSeparators=",; &tab;" comment="#" showIgnoreFirstline="true" qualifiers=""optional" >
<Image index="0" format="name.ext"/>
<X index="1" format="value"/>
<Y index="2" format="value"/>
<Altitude index="3" format="value"/>
<XAccuracy index="4" format="value"/>
<YAccuracy index="5" format="value"/>
<AltitudeAccuracy index="6" format="value"/>
<Yaw index="7" format="value"/>
<Pitch index="8" format="value"/>
<Roll index="9" format="value"/>
</parser>
</format>
Available variables:
- Image Image name including the whole path and the format extension.
- Longitude Longitude coordinate of the camera position.
- LongitudeAccuracy Position accuracy of the longitude coordinate.
- X Coordinate X of the camera position.
- XAccuracy Position accuracy of the X coordinate.
- Latitude Latitude coordinate of the camera position.
- LatitudeAccuracy Position accuracy of the latitude coordinate.
- Y Coordinate Y of the camera position.
- YAccuracy Position accuracy of the Y coordinate.
- Altitude Altitude (Z) coordinate of the camera position.
- AltitudeAccuracy Position accuracy of the altitude (Z) coordinate.
- Yaw Prior yaw rotation (around Y-axis).
- YawAccuracy Prior yaw rotation accuracy.
- Omega Prior omega rotation (only for georeferenced scenes).
- OmegaAccuracy Prior omega rotation accuracy.
- Pitch Prior pitch rotation (around X-axis).
- PitchAccuracy Prior pitch rotation accuracy.
- Phi Prior phi rotation (only for georeferenced scenes).
- PhiAccuracy Prior phi rotation accuracy.
- Roll Prior roll rotation (around Z-axis).
- RollAccuracy Prior roll rotation accuracy.
- Kappa Prior kappa rotation (only for georeferenced scenes).
- KappaAccuracy Prior kappa rotation accuracy.
- OffsetX Camera offset on the X-axis.
- OffsetY Camera offset on the Y-axis.
- OffsetZ Camera offset on the Z-axis.
- OffsetYaw Camera offset in the yaw rotation angle.
- OffsetPitch Camera offset in the pitch rotation angle.
- OffsetRoll Camera offset in the roll rotation angle.
- FocalLength Focal length (prior calibration).
- PrincipalU Principal point x (prior calibration).
- PrincipalV Principal point y (prior calibration).
- Skew Camera skew coefficient (prior calibration).
- AspectRatio Camera aspect ratio correction factor (prior calibration).
- RadialDistortion1 First distortion model radial coefficient (prior lens distortion).
- RadialDistortion2 Second distortion model radial coefficient (prior lens distortion).
- RadialDistortion3 Third distortion model radial coefficient (prior lens distortion).
- RadialDistortion4 Fourth distortion model radial coefficient (prior lens distortion).
- TangentialDistortion1 First distortion model tangential coefficient (prior lens distortion).
- TangentialDistortion2 Second distortion model tangential coefficient (prior lens distortion).