How to define own import format
RealityCapture allows you to modify the import of some text files (such as control points measurements, ground control points, distance definitions,
and flight log) to some extent. You need to modify the specific .xml located in the installation folder.
You can define custom imported parameters, their order or different values separator. Depending on the type of inputs you are importing, the different
reader is used. But there is a common syntax for format definition when importing text files.
<format desc="displayed text in import dialog" reader="" >
<parser allowedSeparators="" comment="" qualifier="">
<Variable index="" format="" />
</parser>
</format>
- <format> defines the parameters of the imported file
- desc - defines the name of the file format displayed in the import dial
- descID – optional, unique internal number for language localization
- reader - file reade
- id - unique format id (GUID
- <parser> defines how the file is read
- separator - one or more symbols used as delimiters (e.g.comma "," or space " "
- allowedSeparators - defines the list of separators displayed in the import dialog. The separator is automatically detected from a file or can be chosen by the user manually. If none is defined, a symbol defined in the "separator" is used
- comment - one or more symbols that define a comment in a file. All text in line after this symbol is ignored
- qualifier - one or more symbols that can be used to go around each field to signify it is the same field (e.g. double quotes)
- showIgnoreFirstline - can be true/false and defines whether to display an option to ignore the first line in the import dialo
- <Variable> a type of imported value. Available variables are dependent on the chosen reader. You can see the list of available variables for importing CPs, GCPs, distance definitions and flight logs in the corresponding paragraphs below
- index - defines the number of the column that stores the specific variabl
- format - format of the imported value.
Supported formats are: value – exact number, degrees – expected value is in degrees format (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 definition import
You can define a custom file format by modifying “distancedefinitions.xml” located in the installation folder. 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 - name of a distance constrain
- PointA - the first point of a defined distanc
- PointB - the second point of a defined distanc
- Distance - defined distanc
- DistanceAccuracy - prior accuracy of a defined distanc
Control point measurements import
You can define a custom file format by modifying “measurementsimport.xml” located in the installation folder. 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 path and format extensio
- PointName - name of a control poin
- X - position of the control point on the image in X-axis in pixels (from the upper left corner of the image
- Y - position of the control point on the image in Y-axis in pixels (from the upper left corner of the image
- XAccuracy - the accuracy of the X measuremen
- YAccuracy - the accuracy of the Y measuremen
- RotationAccuracy - rotation of the accuracy region (can be calculated when using automatic markers detection
Ground control points import
You can define a custom file format by modifying “groundcontrol.xml” located in the installation folder. 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 a ground control poin
- Longitude - the longitude coordinate of the ground control poin
- LongitudeAccuracy - prior accuracy for the longitude coordinat
- X - X coordinate of the ground control poin
- XAccuracy - prior accuracy for the X coordinat
- Latitude - the latitude coordinate of the ground control poin
- LatitudeAccuracy - prior accuracy for the latitude coordinat
- Y - Y coordinate of the ground control poin
- YAccuracy - prior accuracy for the Y coordinat
- Altitude - the altitude (Z) coordinate of the ground control poin
- AltitudeAccuracy - prior accuracy for the altitude (Z) coordinat
Flight log import
You can define a custom file format by modifying “flightlogs.xml” located in the installation folder. 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 path and format extensio
- Longitude - the longitude coordinate of the camera position
- LongitudeAccuracy - prior accuracy for longitude coordinate
- X - the X coordinate of a camera positio
- XAccuracy - prior accuracy for the X coordinat
- Latitude - the latitude coordinate of the camera positio
- LatitudeAccuracy - prior accuracy for latitude coordinat
- Y - the Y coordinate of a camera positio
- YAccuracy - prior accuracy for the Y coordinat
- Altitude - the altitude (Z) coordinate of a camera positio
- AltitudeAccuracy - prior accuracy for the altitude (Z) coordinate
- Yaw - prior rotation angle Yaw (around Y-axis
- YawAccuracy - prior accuracy for rotation angle Yaw
- Omega - prior rotation angle Omega (only for geo-referenced scenes)
- OmegaAccuracy - prior accuracy for rotation angle Omeg
- Pitch - prior rotation angle Pitch (around X-axis
- PitchAccuracy - prior accuracy for rotation angle Pitc
- Phi - prior rotation angle Phi (only for geo-referenced scenes
- PhiAccuracy - prior accuracy for rotation angle Ph
- Roll - prior rotation angle Roll (around Z-axis
- RollAccuracy - prior accuracy for rotation angle Rol
- Kappa - prior rotation angle Kappa (only for geo-referenced scenes
- KappaAccuracy - prior accuracy for rotation angle Kappa
- OffsetX - camera offset in X-axi
- OffsetY - camera offset in Y-axis
- OffsetZ - camera offset in Z-axis
- OffsetYaw - camera offset in Yaw rotation angl
- OffsetPitch - camera offset in Pitch rotation angl
- OffsetRoll - camera offset in Roll rotation angl
- FocalLength - a focal length (prior calibration
- PrincipalU - the principal point x (prior calibration
- PrincipalV - the principal point y (prior calibration
- Skew - skew coefficient (prior calibration
- AspectRatio - aspect ratio (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