Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion opendm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'geo': 'dataset',
'gltf': 'mvs_texturing',
'gps_accuracy': 'dataset',
'gps_z_offset': 'dataset',
'help': None,
'ignore_gsd': 'opensfm',
'matcher_neighbors': 'opensfm',
Expand Down Expand Up @@ -845,7 +846,17 @@ def config(argv=None, parser=None):
'with high precision GPS information (RTK), this value will be automatically '
'set accordingly. You can use this option to manually set it in case the reconstruction '
'fails. Lowering this option can sometimes help control bowling-effects over large areas. Default: %(default)s')


parser.add_argument('--gps-z-offset',
type=float,
action=StoreValue,
metavar='<float>',
default=0,
help='Set a GPS offset in meters for the vertical axis (Z) '
'by adding it to the altitude value of the GPS EXIF data. This does not change the value of any GCPs. '
'This can be useful for example when adjusting from ellipsoidal to orthometric height. '
'Default: %(default)s')

parser.add_argument('--optimize-disk-space',
action=StoreTrue,
nargs=0,
Expand Down
6 changes: 6 additions & 0 deletions opendm/photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,12 @@ def get_gps_dop(self):

def override_gps_dop(self, dop):
self.gps_xy_stddev = self.gps_z_stddev = dop

def adjust_z_offset(self, z_offset):
if self.altitude is not None:
self.altitude += z_offset
else:
self.altitude = z_offset

def override_camera_projection(self, camera_projection):
if camera_projection in projections:
Expand Down
7 changes: 7 additions & 0 deletions stages/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,10 @@ def parallel_bg_filter(item):
if args.rolling_shutter and not reconstruction.is_georeferenced():
log.ODM_WARNING("Reconstruction is not georeferenced, disabling rolling shutter correction")
args.rolling_shutter = False

# GPS Z offset
if 'gps_z_offset_is_set' in args:
log.ODM_INFO("Adjusting GPS Z offset by %s for all images" % args.gps_z_offset)

for p in photos:
p.adjust_z_offset(args.gps_z_offset)
Loading