kopia lustrzana https://github.com/OpenDroneMap/ODM
Add hybrid bundling option to OpenSfM step
rodzic
d998d43a6b
commit
b8b8acf5f1
|
@ -8,8 +8,8 @@ ExternalProject_Add(${_proj_name}
|
||||||
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
||||||
#--Download step--------------
|
#--Download step--------------
|
||||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||||
URL https://github.com/OpenDroneMap/mvs-texturing/archive/bc2c5695e32366fc00e04a560d0d933715a524a1.zip
|
URL https://github.com/OpenDroneMap/mvs-texturing/archive/4f885aff1d92fb20a7d72d320be5b935397c81c9.zip
|
||||||
URL_MD5 1c53b1bd78695fe55b7df118c4216605
|
URL_MD5 cbcccceba4693c6c882eb4aa618a2227
|
||||||
#--Update/Patch step----------
|
#--Update/Patch step----------
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
#--Configure step-------------
|
#--Configure step-------------
|
||||||
|
|
|
@ -16,6 +16,7 @@ project_path: '/' #DO NOT CHANGE THIS OR DOCKER WILL NOT WORK. It should be '/'
|
||||||
#verbose: False
|
#verbose: False
|
||||||
#time: False
|
#time: False
|
||||||
#use_fixed_camera_params: False
|
#use_fixed_camera_params: False
|
||||||
|
#use_hybrid_bundle_adjustment: False
|
||||||
#opensfm_processes: 4 # by default this is set to $(nproc)
|
#opensfm_processes: 4 # by default this is set to $(nproc)
|
||||||
#min_num_features: 4000
|
#min_num_features: 4000
|
||||||
#matcher_threshold: 2.0
|
#matcher_threshold: 2.0
|
||||||
|
@ -43,6 +44,7 @@ project_path: '/' #DO NOT CHANGE THIS OR DOCKER WILL NOT WORK. It should be '/'
|
||||||
#texturing_keep_unseen_faces: False
|
#texturing_keep_unseen_faces: False
|
||||||
#texturing_tone_mapping: 'none'
|
#texturing_tone_mapping: 'none'
|
||||||
#gcp: !!null # YAML tag for None
|
#gcp: !!null # YAML tag for None
|
||||||
|
#use_exif: False # Set to True if you have a GCP file (it auto-detects) and want to use EXIF
|
||||||
#dtm: False # Use this tag to build a DTM (Digital Terrain Model
|
#dtm: False # Use this tag to build a DTM (Digital Terrain Model
|
||||||
#dsm: False # Use this tag to build a DSM (Digital Surface Model
|
#dsm: False # Use this tag to build a DSM (Digital Surface Model
|
||||||
#dem-gapfill-steps: 4
|
#dem-gapfill-steps: 4
|
||||||
|
@ -52,8 +54,9 @@ project_path: '/' #DO NOT CHANGE THIS OR DOCKER WILL NOT WORK. It should be '/'
|
||||||
#dem-approximate: False
|
#dem-approximate: False
|
||||||
#dem-decimation: 1
|
#dem-decimation: 1
|
||||||
#dem-terrain-type: ComplexForest
|
#dem-terrain-type: ComplexForest
|
||||||
#use_exif: False # Set to True if you have a GCP file (it auto-detects) and want to use EXIF
|
|
||||||
#orthophoto_resolution: 20.0 # Pixels/meter
|
#orthophoto_resolution: 20.0 # Pixels/meter
|
||||||
#orthophoto_target_srs: !!null # Currently does nothing
|
#orthophoto_target_srs: !!null # Currently does nothing
|
||||||
#orthophoto_no_tiled: False
|
#orthophoto_no_tiled: False
|
||||||
#orthophoto_compression: DEFLATE # Options are [JPEG, LZW, PACKBITS, DEFLATE, LZMA, NONE] Don't change unless you know what you are doing
|
#orthophoto_compression: DEFLATE # Options are [JPEG, LZW, PACKBITS, DEFLATE, LZMA, NONE] Don't change unless you know what you are doing
|
||||||
|
#orthophoto_bigtiff: IF_SAFER # Options are [YES, NO, IF_NEEDED, IF_SAFER]
|
||||||
|
#build_overviews: FALSE
|
||||||
|
|
|
@ -2,7 +2,6 @@ import argparse
|
||||||
from opendm import context
|
from opendm import context
|
||||||
from opendm import io
|
from opendm import io
|
||||||
from opendm import log
|
from opendm import log
|
||||||
from yaml import safe_load
|
|
||||||
from appsettings import SettingsParser
|
from appsettings import SettingsParser
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
@ -144,6 +143,12 @@ def config():
|
||||||
help=('The maximum number of processes to use in dense '
|
help=('The maximum number of processes to use in dense '
|
||||||
'reconstruction. Default: %(default)s'))
|
'reconstruction. Default: %(default)s'))
|
||||||
|
|
||||||
|
parser.add_argument('--use-hybrid-bundle-adjustment',
|
||||||
|
action='store_true',
|
||||||
|
default=False,
|
||||||
|
help='Run local bundle adjustment for every image added to the reconstruction and a global '
|
||||||
|
'adjustment every 100 images. Speeds up reconstruction for very large datasets.')
|
||||||
|
|
||||||
parser.add_argument('--use-25dmesh',
|
parser.add_argument('--use-25dmesh',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
|
|
|
@ -45,7 +45,8 @@ class ODMApp(ecto.BlackBox):
|
||||||
processes=p.args.opensfm_processes,
|
processes=p.args.opensfm_processes,
|
||||||
matching_gps_neighbors=p.args.matcher_neighbors,
|
matching_gps_neighbors=p.args.matcher_neighbors,
|
||||||
matching_gps_distance=p.args.matcher_distance,
|
matching_gps_distance=p.args.matcher_distance,
|
||||||
fixed_camera_params=p.args.use_fixed_camera_params),
|
fixed_camera_params=p.args.use_fixed_camera_params,
|
||||||
|
hybrid_bundle_adjustment=p.args.use_hybrid_bundle_adjustment),
|
||||||
'slam': ODMSlamCell(),
|
'slam': ODMSlamCell(),
|
||||||
'cmvs': ODMCmvsCell(max_images=p.args.cmvs_maxImages),
|
'cmvs': ODMCmvsCell(max_images=p.args.cmvs_maxImages),
|
||||||
'pmvs': ODMPmvsCell(level=p.args.pmvs_level,
|
'pmvs': ODMPmvsCell(level=p.args.pmvs_level,
|
||||||
|
@ -97,7 +98,7 @@ class ODMApp(ecto.BlackBox):
|
||||||
|
|
||||||
def connections(self, p):
|
def connections(self, p):
|
||||||
if p.args.video:
|
if p.args.video:
|
||||||
return self.slam_connections(_p)
|
return self.slam_connections(p)
|
||||||
|
|
||||||
# define initial task
|
# define initial task
|
||||||
# TODO: What is this?
|
# TODO: What is this?
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ODMOpenSfMCell(ecto.Cell):
|
||||||
params.declare("matching_gps_neighbors", "The application arguments.", 8)
|
params.declare("matching_gps_neighbors", "The application arguments.", 8)
|
||||||
params.declare("matching_gps_distance", "The application arguments.", 0)
|
params.declare("matching_gps_distance", "The application arguments.", 0)
|
||||||
params.declare("fixed_camera_params", "Optimize internal camera parameters", True)
|
params.declare("fixed_camera_params", "Optimize internal camera parameters", True)
|
||||||
|
params.declare("hybrid_bundle_adjustment", "USe local + global bundle adjustment", False)
|
||||||
|
|
||||||
def declare_io(self, params, inputs, outputs):
|
def declare_io(self, params, inputs, outputs):
|
||||||
inputs.declare("tree", "Struct with paths", [])
|
inputs.declare("tree", "Struct with paths", [])
|
||||||
|
@ -80,6 +81,12 @@ class ODMOpenSfMCell(ecto.Cell):
|
||||||
config.append("use_altitude_tag: True")
|
config.append("use_altitude_tag: True")
|
||||||
config.append("align_method: naive")
|
config.append("align_method: naive")
|
||||||
|
|
||||||
|
if args.use_hybrid_bundle_adjustment:
|
||||||
|
log.ODM_DEBUG("Enabling hybrid bundle adjustment")
|
||||||
|
config.append("bundle_interval: 100") # Bundle after adding 'bundle_interval' cameras
|
||||||
|
config.append("bundle_new_points_ratio: 1.2") # Bundle when (new points) / (bundled points) > bundle_new_points_ratio
|
||||||
|
config.append("local_bundle_radius: 1") # Max image graph distance for images to be included in local bundle adjustment
|
||||||
|
|
||||||
if args.matcher_distance > 0:
|
if args.matcher_distance > 0:
|
||||||
config.append("matching_gps_distance: %s" % self.params.matching_gps_distance)
|
config.append("matching_gps_distance: %s" % self.params.matching_gps_distance)
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ project_path: '' # Example: '/home/user/ODMProjects
|
||||||
#verbose: False
|
#verbose: False
|
||||||
#time: False
|
#time: False
|
||||||
#use_fixed_camera_params: False
|
#use_fixed_camera_params: False
|
||||||
|
#use_hybrid_bundle_adjustment: False
|
||||||
#opensfm_processes: 4 # by default this is set to $(nproc)
|
#opensfm_processes: 4 # by default this is set to $(nproc)
|
||||||
#min_num_features: 4000
|
#min_num_features: 4000
|
||||||
#matcher_threshold: 2.0
|
#matcher_threshold: 2.0
|
||||||
|
@ -57,3 +58,6 @@ project_path: '' # Example: '/home/user/ODMProjects
|
||||||
#orthophoto_target_srs: !!null # Currently does nothing
|
#orthophoto_target_srs: !!null # Currently does nothing
|
||||||
#orthophoto_no_tiled: False
|
#orthophoto_no_tiled: False
|
||||||
#orthophoto_compression: DEFLATE # Options are [JPEG, LZW, PACKBITS, DEFLATE, LZMA, NONE] Don't change unless you know what you are doing
|
#orthophoto_compression: DEFLATE # Options are [JPEG, LZW, PACKBITS, DEFLATE, LZMA, NONE] Don't change unless you know what you are doing
|
||||||
|
#orthophoto_bigtiff: IF_SAFER # Options are [YES, NO, IF_NEEDED, IF_SAFER]
|
||||||
|
#build_overviews: FALSE
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue