Skip to main content

ReconstructAT - Aerotriangulation

Overview

The ReconstructAT interface is used to perform aerotriangulation (Aerotriangulation) and is the preferred interface for professional users who need fine control. This interface provides detailed parameter settings and supports advanced features such as camera grouping, POS import, and control point import.

Applicable Scenarios
  • Need fine control of aerotriangulation parameters
  • Need to check and optimize aerotriangulation results
  • Multi-camera system reconstruction
  • Need to integrate control points

Interface Invocation

Command Line Invocation

reconstruct_full_engine(.exe) -reconstruct_type 1 -task_json config_task.json

Parameter Description

  • reconstruct_type: Fixed as 1 (represents ReconstructAT)
  • task_json: Parameter file path

Parameter Details

Required Parameters

Parameter NameTypeDescription
working_dirstringWorking directory, saves intermediate files and final results
gdal_folderstringGDAL data path (SDK external data folder)
coordinate_systemJSONCoordinate system of input image positions
camera_meta_dataJSON ArrayCamera metadata information, format see camera_meta_data
image_meta_dataJSON ArrayInput image metadata information, format see image_meta_data

Optional Parameters

Parameter NameTypeDefault ValueDescription
input_image_typeint1Image type: 1=RGB, 2=Multispectral, 3=Infrared

Data Structure Description

coordinate_system Object

Field NameTypeDescriptionExample Value
typeintCoordinate system type: 0=LocalENU, 1=Local, 2=Geographic, 3=Projected, 4=ECEF2
type_namestringCoordinate system type name (optional, auxiliary description)"Geographic"
labelstringCoordinate system name (optional)"WGS 84"
epsg_codeintEPSG code (required for geographic/projected/geocentric coordinate systems)4326
wktstringWKT string (optional, alternative to epsg_code)"..."
origin_pointarray[3]Origin WGS84 coordinates [longitude, latitude, elevation] (required only when type=0 LocalENU)[114.12, 22.12, 0]
offsetarray[3]Coordinate system origin offset (optional)[0, 0, 0]

Camera Metadata

Field NameTypeRequiredDescription
idintYesCamera unique ID
meta_dataobjectYesCamera metadata, see table below for details

meta_data Sub-field Description:

Field NameTypeRequiredDescription
projection_modelintYesLens model: 0-perspective lens (k1,k2,k3,p1,p2); 1-fisheye lens (k1,k2,k3,k4)
camera_namestringYesCamera name
widthintYesSensor width (pixels)
heightintYesSensor height (pixels)
parametersarrayNoCamera internal parameter group (perspective camera order: fx, fy, cx, cy, k1, k2, k3, p1, p2; fisheye camera order: fx fy cx cy k1 k2 k3 k4)
constant_parametersarrayNoArray of parameter indices to fix camera internal parameters during AT solution, specified according to the parameter order in parameters (index starts from 0), e.g., for perspective camera, specifying [0,1,2,3,4,5,6,7,8] means fixing all parameters
普通镜头
"camera_meta_data": [
{
"id": 1,
"meta_data": {
"projection_model": 0,
"camera_name": "common",
"width": 5280,
"height": 3956,
"parameters": [
3713.29,
3713.29,
2647.02,
1969.28,
-0.11257524,
0.01487443,
-0.00008572,
1e-7,
-0.02706411
]
}
}
]
Fisheye Lens
"camera_meta_data": [
{
"id": 1,
"meta_data": {
"camera_name": "fisheye",
"projection_model": 1,
"width": 3600,
"height": 3600,
"parameters": [
982.7593599212141,
982.7593599212141,
1747.6373897301492,
1806.4116030074354,
0.03702410479839055,
-0.016007338300982825,
-1.0884582901480562e-05,
-9.773097281093723e-05
]
}
}
]

Image Metadata

Field NameTypeRequiredDescription
idintYesImage unique ID
pathstringYesImage absolute path
meta_dataobjectYesImage metadata, see table below for details
[Important] Calling ReconstructAT must specify the meta_data field

meta_data Sub-field Description:

Field NameTypeRequiredDescription
widthintYesImage width (pixels)
heightintYesImage height (pixels)
camera_idintYesCorresponding camera ID
focal_length_in_35mmdoubleNo35mm equivalent focal length (millimeters)
posarray[3]NoPOS position [longitude/X, latitude/Y, elevation/Z], must be specified for true-scale reconstruction
pos_sigmaarray[3]NoPOS position accuracy (meters), RTK positioning: [0.03,0.03,0.06], regular GPS positioning: [2.0,2.0,5.0]. If RTK positioning data is used, it is strongly recommended to select RTK weight for highest accuracy
orientationarray[9]No3x3 rotation matrix (9 values, row-major order, unit vectors, rotation matrix from world coordinate system to camera coordinate system)
position_constantboolNoWhether to fix position (true/false), fixing position means AT will not optimize and change the image position, keeping the input value
relative_altitudedoubleNoRelative flight altitude (meters)
pre_calib_paramarrayNoPre-calibration parameters (if available, fill in camera internal parameters)
dewarp_flagboolNoDistortion correction flag (if from DJI XMP data, true means already distortion-corrected)
mask_pathstringNoSemantic segmentation map, format tif or png, label meanings see below

Semantic Label Meanings

Label ValueLabel Meaning
0Background
1Water
2Building
3Vegetation
4Road
5Vehicle
6Bare ground
7Hard ground
33Moving object
34Sky
35Power line
255Invalid area

Typical Use Cases for Semantic Maps:

  • (1) Pass the path of a Mask image marked with invalid areas, and the SDK will ignore invalid areas during feature extraction, dense point cloud computation, and texture mapping, improving efficiency and obtaining cleaner point cloud/mesh data
  • (2) Pass the path of a Mask image marked with water areas, and the SDK will automatically repair water areas.
{
"id": 1, // Image unique ID
"path": "path/to/image.jpg", // Image absolute path
"group": "camera_1", // Camera group ID (optional)
"meta_data": { // Image information (required)
"width": 6000, // Image width (pixels)
"height": 4000, // Image height (pixels)
"camera_id": 1, // Corresponding camera ID (optional, if 'pre_calib_param' is provided, it will be overridden by camera metadata)
"pos": [lon, lat, alt], // Position [longitude, latitude, elevation]
"pos_sigma": [1.0, 1.0, 2.0], // Position accuracy (meters)
"orientation": [...], // Rotation matrix (9 values, optional)
"position_constant": false, // Whether to fix position
"relative_altitude": 100.0, // Relative flight altitude (optional)
"focal_length_in_35mm": 24, // 35mm equivalent focal length
"pre_calib_param": [...], // Pre-calibration parameters (optional, if 'focal_length_in_35mm' is provided, it will be overridden)
"dewarp_flag": false // Distortion correction flag (optional, from DJI XMP data)
}
}

Complete Configuration Examples

Basic Aerotriangulation Configuration

{
"working_dir": "C:/Projects/AT_Task",
"gdal_folder": "C:/MipMap/SDK/data",
"coordinate_system": {
"type": 2,
"epsg_code": 4326
},
"camera_meta_data": [
{
"id": 1,
"meta_data": {
"camera_name": "DJI FC6310",
"width": 5472,
"height": 3648
}
}
],
"image_meta_data": [
{
"id": 1,
"path": "C:/Images/DJI_0001.JPG",
"meta_data": {
"width": 5472,
"height": 3648,
"camera_id": 1,
"pos": [114.123456, 22.123456, 100.5],
"pos_sigma": [0.03,0.03,0.06]
}
},
{
"id": 2,
"path": "C:/Images/DJI_0002.JPG",
"meta_data": {
"width": 5472,
"height": 3648,
"camera_id": 1,
"pos": [114.123556, 22.123456, 100.8],
"pos_sigma": [0.03,0.03,0.06]
}
}
]
}

Multi-Camera Group Configuration

{
"working_dir": "C:/Projects/MultiCamera_AT",
"gdal_folder": "C:/MipMap/SDK/data",
"coordinate_system": {
"type": 2,
"epsg_code": 4326
},
"camera_meta_data": [
{
"id": 1,
"meta_data": {
"camera_name": "Camera_Nadir",
"width": 6000,
"height": 4000
}
},
{
"id": 2,
"meta_data": {
"camera_name": "Camera_Oblique",
"width": 6000,
"height": 4000
}
}
],
"image_meta_data": [
{
"id": 1,
"path": "nadir/IMG_0001.JPG",
"group": "nadir",
"meta_data": {
"width": 6000,
"height": 4000,
"camera_id": 1,
"pos": [114.123456, 22.123456, 200.0],
"pos_sigma": [2.0, 2.0, 5.0]
}
},
{
"id": 2,
"path": "oblique/IMG_0001.JPG",
"group": "oblique_forward",
"meta_data": {
"width": 6000,
"height": 4000,
"camera_id": 2,
"pos": [114.123456, 22.123456, 200.0],
"pos_sigma": [2.0, 2.0, 5.0]
}
}
]
}

Error Handling

The interface returns an integer error code:

  • 0: Success
  • Non-zero: Various error conditions

For details, see Error Codes.

Next Steps


Tip: ReconstructAT provides maximum flexibility but also requires more parameter settings. If you only need quick reconstruction, it is recommended to use ReconstructFull.