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 as1(represents ReconstructAT)task_json: Parameter file path
Parameter Details
Required Parameters
| Parameter Name | Type | Description |
|---|---|---|
working_dir | string | Working directory, saves intermediate files and final results |
gdal_folder | string | GDAL data path (SDK external data folder) |
coordinate_system | JSON | Coordinate system of input image positions |
camera_meta_data | JSON Array | Camera metadata information, format see camera_meta_data |
image_meta_data | JSON Array | Input image metadata information, format see image_meta_data |
Optional Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
input_image_type | int | 1 | Image type: 1=RGB, 2=Multispectral, 3=Infrared |
Data Structure Description
coordinate_system Object
| Field Name | Type | Description | Example Value |
|---|---|---|---|
type | int | Coordinate system type: 0=LocalENU, 1=Local, 2=Geographic, 3=Projected, 4=ECEF | 2 |
type_name | string | Coordinate system type name (optional, auxiliary description) | "Geographic" |
label | string | Coordinate system name (optional) | "WGS 84" |
epsg_code | int | EPSG code (required for geographic/projected/geocentric coordinate systems) | 4326 |
wkt | string | WKT string (optional, alternative to epsg_code) | "..." |
origin_point | array[3] | Origin WGS84 coordinates [longitude, latitude, elevation] (required only when type=0 LocalENU) | [114.12, 22.12, 0] |
offset | array[3] | Coordinate system origin offset (optional) | [0, 0, 0] |
Camera Metadata
| Field Name | Type | Required | Description |
|---|---|---|---|
id | int | Yes | Camera unique ID |
meta_data | object | Yes | Camera metadata, see table below for details |
meta_data Sub-field Description:
| Field Name | Type | Required | Description |
|---|---|---|---|
projection_model | int | Yes | Lens model: 0-perspective lens (k1,k2,k3,p1,p2); 1-fisheye lens (k1,k2,k3,k4) |
camera_name | string | Yes | Camera name |
width | int | Yes | Sensor width (pixels) |
height | int | Yes | Sensor height (pixels) |
parameters | array | No | Camera 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_parameters | array | No | Array 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 Name | Type | Required | Description |
|---|---|---|---|
id | int | Yes | Image unique ID |
path | string | Yes | Image absolute path |
meta_data | object | Yes | Image metadata, see table below for details |
[Important] Calling ReconstructAT must specify the meta_data field
meta_data Sub-field Description:
| Field Name | Type | Required | Description |
|---|---|---|---|
width | int | Yes | Image width (pixels) |
height | int | Yes | Image height (pixels) |
camera_id | int | Yes | Corresponding camera ID |
focal_length_in_35mm | double | No | 35mm equivalent focal length (millimeters) |
pos | array[3] | No | POS position [longitude/X, latitude/Y, elevation/Z], must be specified for true-scale reconstruction |
pos_sigma | array[3] | No | POS 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 |
orientation | array[9] | No | 3x3 rotation matrix (9 values, row-major order, unit vectors, rotation matrix from world coordinate system to camera coordinate system) |
position_constant | bool | No | Whether to fix position (true/false), fixing position means AT will not optimize and change the image position, keeping the input value |
relative_altitude | double | No | Relative flight altitude (meters) |
pre_calib_param | array | No | Pre-calibration parameters (if available, fill in camera internal parameters) |
dewarp_flag | bool | No | Distortion correction flag (if from DJI XMP data, true means already distortion-corrected) |
mask_path | string | No | Semantic segmentation map, format tif or png, label meanings see below |
Semantic Label Meanings
| Label Value | Label Meaning |
|---|---|
0 | Background |
1 | Water |
2 | Building |
3 | Vegetation |
4 | Road |
5 | Vehicle |
6 | Bare ground |
7 | Hard ground |
33 | Moving object |
34 | Sky |
35 | Power line |
255 | Invalid 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: SuccessNon-zero: Various error conditions
For details, see Error Codes.
Next Steps
- Use Reconstruct3D for 3D reconstruction
- Use OptimizeAT to optimize aerotriangulation results with control points
Tip: ReconstructAT provides maximum flexibility but also requires more parameter settings. If you only need quick reconstruction, it is recommended to use ReconstructFull.