kopia lustrzana https://github.com/OpenDroneMap/ODM
Density --> spacing
rodzic
3d4725c615
commit
a58c50a663
|
@ -374,7 +374,7 @@ def window_filter_2d(arr, nodata, window, kernel_size, filter):
|
|||
|
||||
|
||||
def get_dem_radius_steps(stats_file, steps, resolution, multiplier = 1.0):
|
||||
radius_steps = [point_cloud.get_density(stats_file, resolution) * multiplier]
|
||||
radius_steps = [point_cloud.get_spacing(stats_file, resolution) * multiplier]
|
||||
for _ in range(steps - 1):
|
||||
radius_steps.append(radius_steps[-1] * math.sqrt(2)) # sqrt(2) is arbitrary, maybe there's a better value?
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ def filter(input_point_cloud, output_point_cloud, output_stats, standard_deviati
|
|||
log.ODM_WARNING("{} not found, filtering has failed.".format(output_point_cloud))
|
||||
|
||||
|
||||
def get_density(stats_file, resolution_fallback=5.0):
|
||||
def get_spacing(stats_file, resolution_fallback=5.0):
|
||||
def fallback():
|
||||
log.ODM_WARNING("Cannot read %s, falling back to resolution estimate" % stats_file)
|
||||
return (resolution_fallback / 100.0) / 2.0
|
||||
|
@ -119,8 +119,8 @@ def get_density(stats_file, resolution_fallback=5.0):
|
|||
|
||||
with open(stats_file, 'r') as f:
|
||||
j = json.loads(f.read())
|
||||
if "density" in j:
|
||||
d = j["density"]
|
||||
if "spacing" in j:
|
||||
d = j["spacing"]
|
||||
if d > 0:
|
||||
return round(d, 3)
|
||||
else:
|
||||
|
|
Ładowanie…
Reference in New Issue