kopia lustrzana https://github.com/OpenDroneMap/ODM
Bug fixes, more memory efficient DEM smoothing
rodzic
cc7fb2efa5
commit
6e23de03a0
|
@ -22,7 +22,7 @@ def compute_boundary_from_shots(reconstruction_json, buffer=0, reconstruction_of
|
||||||
|
|
||||||
for shot_image in reconstruction['shots']:
|
for shot_image in reconstruction['shots']:
|
||||||
shot = reconstruction['shots'][shot_image]
|
shot = reconstruction['shots'][shot_image]
|
||||||
if shot['gps_dop'] < 999999:
|
if shot.get('gps_dop', 999999) < 999999:
|
||||||
camera = reconstruction['cameras'][shot['camera']]
|
camera = reconstruction['cameras'][shot['camera']]
|
||||||
|
|
||||||
p = ogr.Geometry(ogr.wkbPoint)
|
p = ogr.Geometry(ogr.wkbPoint)
|
||||||
|
|
|
@ -333,7 +333,7 @@ def median_smoothing(geotiff_path, output_path, smoothing_iterations=1):
|
||||||
dtype = img.dtypes[0]
|
dtype = img.dtypes[0]
|
||||||
arr = img.read()[0]
|
arr = img.read()[0]
|
||||||
|
|
||||||
nodata_locs = numpy.where(arr == nodata)
|
nodata_locs = arr == nodata
|
||||||
|
|
||||||
# Median filter (careful, changing the value 5 might require tweaking)
|
# Median filter (careful, changing the value 5 might require tweaking)
|
||||||
# the lines below. There's another numpy function that takes care of
|
# the lines below. There's another numpy function that takes care of
|
||||||
|
|
|
@ -28,9 +28,12 @@ class ODMFilterPoints(types.ODM_Stage):
|
||||||
if reconstruction.is_georeferenced():
|
if reconstruction.is_georeferenced():
|
||||||
if not 'boundary' in outputs:
|
if not 'boundary' in outputs:
|
||||||
avg_gsd = gsd.opensfm_reconstruction_average_gsd(tree.opensfm_reconstruction)
|
avg_gsd = gsd.opensfm_reconstruction_average_gsd(tree.opensfm_reconstruction)
|
||||||
outputs['boundary'] = compute_boundary_from_shots(tree.opensfm_reconstruction, avg_gsd * 20, reconstruction.get_proj_offset()) # 20 is arbitrary
|
if avg_gsd is not None:
|
||||||
if outputs['boundary'] is None:
|
outputs['boundary'] = compute_boundary_from_shots(tree.opensfm_reconstruction, avg_gsd * 20, reconstruction.get_proj_offset()) # 20 is arbitrary
|
||||||
log.ODM_WARNING("Cannot compute boundary from camera shots")
|
if outputs['boundary'] is None:
|
||||||
|
log.ODM_WANING("Cannot compute boundary from camera shots")
|
||||||
|
else:
|
||||||
|
log.ODM_WARNING("Cannot compute boundary (GSD cannot be estimated)")
|
||||||
else:
|
else:
|
||||||
log.ODM_WARNING("--auto-boundary set but so is --boundary, will use --boundary")
|
log.ODM_WARNING("--auto-boundary set but so is --boundary, will use --boundary")
|
||||||
else:
|
else:
|
||||||
|
|
Ładowanie…
Reference in New Issue