Merge pull request #1754 from pierotofy/minviews

Use min views filter = 1
pull/1756/head v3.5.0
Piero Toffanin 2024-04-11 23:18:26 -04:00 zatwierdzone przez GitHub
commit 6084d1dca0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -1 +1 @@
3.4.0 3.5.0

Wyświetl plik

@ -217,7 +217,7 @@ def config(argv=None, parser=None):
parser.add_argument('--feature-type', parser.add_argument('--feature-type',
metavar='<string>', metavar='<string>',
action=StoreValue, action=StoreValue,
default='sift', default='dspsift',
choices=['akaze', 'dspsift', 'hahog', 'orb', 'sift'], choices=['akaze', 'dspsift', 'hahog', 'orb', 'sift'],
help=('Choose the algorithm for extracting keypoints and computing descriptors. ' help=('Choose the algorithm for extracting keypoints and computing descriptors. '
'Can be one of: %(choices)s. Default: ' 'Can be one of: %(choices)s. Default: '
@ -485,7 +485,7 @@ def config(argv=None, parser=None):
metavar='<positive float>', metavar='<positive float>',
action=StoreValue, action=StoreValue,
type=float, type=float,
default=2.5, default=5,
help='Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. ' help='Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. '
'Default: %(default)s') 'Default: %(default)s')

Wyświetl plik

@ -94,7 +94,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
extra_config.append("--ignore-mask-label 0") extra_config.append("--ignore-mask-label 0")
with open(densify_ini_file, 'w+') as f: with open(densify_ini_file, 'w+') as f:
f.write("Optimize = 7\n") f.write("Optimize = 7\nMin Views Filter = 1\n")
def run_densify(): def run_densify():
system.run('"%s" "%s" %s' % (context.omvs_densify_path, system.run('"%s" "%s" %s' % (context.omvs_densify_path,
@ -110,7 +110,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
log.ODM_WARNING("OpenMVS failed with GPU, is your graphics card driver up to date? Falling back to CPU.") log.ODM_WARNING("OpenMVS failed with GPU, is your graphics card driver up to date? Falling back to CPU.")
gpu_config = ["--cuda-device -2"] gpu_config = ["--cuda-device -2"]
run_densify() run_densify()
elif (e.errorCode == 137 or e.errorCode == 3221226505) and not pc_tile: elif (e.errorCode == 137 or e.errorCode == 143 or e.errorCode == 3221226505) and not pc_tile:
log.ODM_WARNING("OpenMVS ran out of memory, we're going to turn on tiling to see if we can process this.") log.ODM_WARNING("OpenMVS ran out of memory, we're going to turn on tiling to see if we can process this.")
pc_tile = True pc_tile = True
config.append("--fusion-mode 1") config.append("--fusion-mode 1")
@ -127,7 +127,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
subscene_densify_ini_file = os.path.join(tree.openmvs, 'subscene-config.ini') subscene_densify_ini_file = os.path.join(tree.openmvs, 'subscene-config.ini')
with open(subscene_densify_ini_file, 'w+') as f: with open(subscene_densify_ini_file, 'w+') as f:
f.write("Optimize = 0\nEstimation Geometric Iters = 0\n") f.write("Optimize = 0\nEstimation Geometric Iters = 0\nMin Views Filter = 1\n")
config = [ config = [
"--sub-scene-area 660000", # 8000 "--sub-scene-area 660000", # 8000
@ -223,7 +223,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
try: try:
system.run('"%s" %s' % (context.omvs_densify_path, ' '.join(config + gpu_config + extra_config))) system.run('"%s" %s' % (context.omvs_densify_path, ' '.join(config + gpu_config + extra_config)))
except system.SubprocessException as e: except system.SubprocessException as e:
if e.errorCode == 137 or e.errorCode == 3221226505: if e.errorCode == 137 or e.errorCode == 143 or e.errorCode == 3221226505:
log.ODM_WARNING("OpenMVS filtering ran out of memory, visibility checks will be skipped.") log.ODM_WARNING("OpenMVS filtering ran out of memory, visibility checks will be skipped.")
skip_filtering() skip_filtering()
else: else: