Merge pull request #1131 from tinyRatP/master

Fixed copy point_cloud.ply if --pc-filter -0

Former-commit-id: 80e161f426
pull/1161/head
Piero Toffanin 2020-07-01 23:36:18 -04:00 zatwierdzone przez GitHub
commit f501d21d6e
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -11,8 +11,14 @@ def filter(input_point_cloud, output_point_cloud, standard_deviation=2.5, meank=
"""
Filters a point cloud
"""
if not os.path.exists(input_point_cloud):
log.ODM_ERROR("{} does not exist. The program will now exit.".format(input_point_cloud))
sys.exit(1)
if (standard_deviation <= 0 or meank <= 0) and sample_radius <= 0:
log.ODM_INFO("Skipping point cloud filtering")
# if using the option `--pc-filter 0`, we need copy input_point_cloud
shutil.copy(input_point_cloud, output_point_cloud)
return
if standard_deviation > 0 and meank > 0:
@ -24,10 +30,6 @@ def filter(input_point_cloud, output_point_cloud, standard_deviation=2.5, meank=
if sample_radius > 0:
log.ODM_INFO("Sampling points around a %sm radius" % sample_radius)
if not os.path.exists(input_point_cloud):
log.ODM_ERROR("{} does not exist, cannot filter point cloud. The program will now exit.".format(input_point_cloud))
sys.exit(1)
filter_program = os.path.join(context.odm_modules_path, 'odm_filterpoints')
if not os.path.exists(filter_program):
log.ODM_WARNING("{} program not found. Will skip filtering, but this installation should be fixed.")