Reconstruct3D - 3D Reconstruction
Overview
The Reconstruct3D interface is used to generate 2D and 3D models from aerial triangulation results. It is typically used with ReconstructAT to complete the full reconstruction workflow. This interface supports multiple output formats, block processing, and fine-grained parameter control.
Applicable Scenarios
- Generate 3D models from aerial triangulation results
- Generate orthophotos and digital surface models
- Block reconstruction for large-scale data
- Need specific output formats
Interface Usage
Command Line Usage
reconstruct_full_engine.exe -reconstruct_type 2 -task_json 3d_config.json
Parameter Description
reconstruct_type
: Fixed as2
(indicates Reconstruct3D)task_json
: Configuration file path
Configuration Parameters
Required Parameters
Parameter | Type | Description |
---|---|---|
license_id | int | SDK license code, unified as 9200 |
working_dir | string | Working directory (must be same as aerial triangulation) |
gdal_folder | string | GDAL data path |
input_image_type | int | Image type: 1=RGB, 2=Multispectral, 3=Infrared |
image_meta_data | JSON Array | Input image metadata information |
resolution_level | int | Reconstruction accuracy: 1=High accuracy, 2=Medium accuracy, 3=Low accuracy |
Optional Parameters
Basic Parameters
Parameter | Type | Default | Description |
---|---|---|---|
reconstruct_mode | int | 0 | Reconstruction mode: 0=General scene, 1=Surrounding scene, 2=Power line scene |
min_avali_memory_size | double | 0 | Minimum available memory (GB), used to control block quantity |
fast_mode | bool | false | Fast mode, improves efficiency but reduces detail |
keep_undistort_images | bool | false | Whether to keep undistorted images |
Output Format Control
Parameter | Type | Default | Description |
---|---|---|---|
generate_osgb | bool | false | Generate OSGB format 3D model |
generate_3d_tiles | bool | false | Generate 3D Tiles (b3dm) format |
generate_las | bool | false | Generate LAS format point cloud |
generate_pc_ply | bool | false | Generate PLY format point cloud |
generate_pc_osgb | bool | false | Generate OSGB format point cloud LOD |
generate_pc_pnts | bool | false | Generate pnts format point cloud LOD |
generate_obj | bool | false | Generate OBJ format textured mesh |
generate_ply | bool | false | Generate PLY format textured mesh |
generate_geotiff | bool | false | Generate GeoTIFF format orthophoto |
generate_tile_2D | bool | false | Perform tile cutting on orthophoto |
generate_2D_from_3D_model | bool | false | Generate 2D orthophoto from 3D model |
Advanced Parameters
Parameter | Type | Default | Description |
---|---|---|---|
use_draco_compression | bool | true | Whether to use Draco compression for 3D Tiles |
tex_image_type_3dtiles | int | 0 | 3D Tiles texture format: 0=JPEG, 1=WebP |
use_gcj02 | bool | false | Whether to convert orthophoto tiles to GCJ02 coordinate system |
coordinate_system_3d | JSON | - | Coordinate system for 3D output |
coordinate_system_2d | JSON | - | Coordinate system for 2D output |
roi_for_2d | JSON | - | Region of interest for 2D reconstruction |
roi_for_3d | JSON | - | Region of interest for 3D reconstruction |
roi_coordinate_system | JSON | WGS84 | Coordinate system for ROI |
Data Structure Description
Camera Metadata
{
"id": 1, // Unique camera ID
"meta_data": {
"camera_name": "Camera-1", // Camera name
"projection_model": 0, // Projection model (optional)
"width": 4000, // Sensor width (pixels)
"height": 3000, // Sensor height (pixels)
"parameters": [ // Camera intrinsics (10 elements array)
// fx, fy, cx, cy, k1, k2, p1, p2, k3,placeholder_param
]
}
}
ROI (Region of Interest)
{
"boundary": [ // 2D polygon boundary (counter-clockwise)
[x1, y1],
[x2, y2],
[x3, y3]
// ...
],
"min_z": 100.0, // Minimum elevation (optional)
"max_z": 500.0 // Maximum elevation (optional)
}
Output Coordinate System Settings
{
"coordinate_system_3d": {
"type": 3, // Projected coordinate system
"epsg_code": 32650 // UTM Zone 50N
},
"coordinate_system_2d": {
"type": 2, // Geographic coordinate system
"epsg_code": 4326 // WGS84
}
}
Complete Configuration Examples
Basic 3D Reconstruction
{
"license_id": 9200,
"working_dir": "C:/Projects/3D_Task",
"gdal_folder": "C:/MipMap/SDK/data",
"input_image_type": 1,
"resolution_level": 2,
"image_meta_data": [
{
"id": 1,
"path": "C:/Images/DJI_0001.JPG"
},
{
"id": 2,
"path": "C:/Images/DJI_0002.JPG"
}
],
"generate_osgb": true,
"generate_3d_tiles": true,
"generate_las": true,
"generate_geotiff": true
}
High-precision Reconstruction Configuration
{
"license_id": 9200,
"working_dir": "C:/Projects/HighQuality_3D",
"gdal_folder": "C:/MipMap/SDK/data",
"input_image_type": 1,
"resolution_level": 1, // Highest accuracy
"reconstruct_mode": 0, // General scene
"image_meta_data": [...],
"generate_osgb": true,
"generate_3d_tiles": true,
"generate_obj": true,
"generate_geotiff": true,
"generate_tile_2D": true,
"coordinate_system_3d": {
"type": 3,
"epsg_code": 32650 // UTM 50N
},
"coordinate_system_2d": {
"type": 2,
"epsg_code": 4326 // WGS84
}
}
Large-scale Data Block Reconstruction
{
"license_id": 9200,
"working_dir": "C:/Projects/LargeScale_3D",
"gdal_folder": "C:/MipMap/SDK/data",
"input_image_type": 1,
"resolution_level": 2,
"min_avali_memory_size": 16.0, // Limit each block to maximum 16GB memory
"image_meta_data": [...],
"roi_for_3d": {
"boundary": [
[114.12, 22.12],
[114.13, 22.12],
[114.13, 22.13],
[114.12, 22.13]
],
"min_z": 0,
"max_z": 500
},
"generate_3d_tiles": true,
"use_draco_compression": true,
"tex_image_type_3dtiles": 1 // Use WebP texture compression
}
Special Scene Configuration
Surrounding Object Reconstruction
{
"license_id": 9200,
"working_dir": "C:/Projects/Object_3D",
"gdal_folder": "C:/MipMap/SDK/data",
"input_image_type": 1,
"resolution_level": 1,
"reconstruct_mode": 1, // Surrounding scene mode
"image_meta_data": [...],
"generate_obj": true,
"generate_ply": true,
"coordinate_system_3d": {
"type": 1 // Local coordinate system
}
}
Generate Orthophoto Only
{
"license_id": 9200,
"working_dir": "C:/Projects/Ortho_Only",
"gdal_folder": "C:/MipMap/SDK/data",
"input_image_type": 1,
"resolution_level": 2,
"image_meta_data": [...],
"generate_geotiff": true,
"generate_tile_2D": true,
"generate_2D_from_3D_model": true,
"roi_for_2d": {
"boundary": [...] // Specify orthophoto extent
},
"coordinate_system_2d": {
"type": 3,
"epsg_code": 32650
}
}
Output Results
3D Model Output (products/3D/
)
model-osgb/
- OSGB format model and LODmodel-b3dm/
- 3D Tiles format (with tileset.json)model-obj/
- OBJ format model and texturespoint-las/
- LAS format point cloudpoint-ply/
- PLY format point cloudpoint-osgb/
- OSGB format point cloud LODpoint-pnts/
- 3D Tiles point cloud format
2D Product Output (products/2D/
)
geotiffs/
- GeoTIFF format orthophoto and DSMdom_tiles/
- Orthophoto tilesdsm_tiles/
- Digital surface model tiles
Intermediate Results (milestones/
)
undistorted/
- Undistorted images (if kept)depth_maps/
- Depth mapsmesh/
- Intermediate mesh data
Resolution Level Description
Level | Description | Relative Processing Time | Application Scenarios |
---|---|---|---|
1 | Ultra-high accuracy | 3-5x | Professional surveying, cultural heritage protection |
2 | High accuracy | 1x | General engineering applications |
3 | Quick preview | 0.2-0.3x | Quick validation, preview |
Balance Between Accuracy and Efficiency
- resolution_level=1: Highest geometric detail and texture clarity
- resolution_level=2: Balance quality and efficiency, recommended for most applications
- resolution_level=3: Fast processing, suitable for preliminary validation
Best Practices
1. Memory Management
For large-scale data:
{
"min_avali_memory_size": 24.0, // Set based on available memory
"resolution_level": 2 // Consider reducing accuracy
}
2. Output Format Selection
- Web Display: Use 3D Tiles + Draco compression
- GIS Analysis: Generate GeoTIFF and LAS
- Professional Software: Use OSGB format
- Editing and Processing: Export OBJ or PLY
3. Coordinate System Settings
- 3D models typically use projected coordinate systems (e.g., UTM)
- Orthophotos can use geographic or projected systems based on needs
- Consider using WGS84 for web applications
4. ROI Usage
- Use ROI generated from aerial triangulation as base
- Adjust range according to needs
- Set separate ROIs for 2D and 3D
Performance Optimization
Fast Processing
{
"resolution_level": 3,
"fast_mode": true,
"generate_3d_tiles": true, // Generate only necessary formats
"use_draco_compression": true
}
High-quality Output
{
"resolution_level": 1,
"fast_mode": false,
"keep_undistort_images": true, // Keep intermediate results for inspection
"generate_obj": true, // Generate high-quality mesh
"generate_geotiff": true
}
Common Questions
Q: Error "Cannot find aerial triangulation results"
A: Ensure:
working_dir
is the same as used in ReconstructAT- Aerial triangulation completed successfully
- milestones directory contains mvs.xml file
Q: Out of memory error
A:
- Set
min_avali_memory_size
to limit memory usage - Reduce
resolution_level
- Use DivideTiles for pre-blocking
Q: Incorrect output coordinates
A:
- Check
coordinate_system_3d/2d
settings - Confirm ROI coordinate system matches data
- Verify GDAL data path is correct
Next Steps
- Check Output Format Details
- Learn about Block Processing for large-scale data
- Study Basic Concepts to optimize reconstruction quality
Note: Reconstruct3D provides rich output options. It's recommended to first validate with low accuracy, then proceed with high-quality reconstruction.