Simplify input parameters

pull/440/head
Dakota Benjamin 2016-12-14 13:30:44 -05:00
rodzic 715f45d828
commit 1f21831726
3 zmienionych plików z 40 dodań i 57 usunięć

Wyświetl plik

@ -162,7 +162,7 @@ def config():
'value leads to more stable reconstructions, but '
'the program becomes slower. Default: %(default)s')
parser.add_argument('--pmvs-minImageNum',
parser.add_argument('--pmvs-min-images',
metavar='<positive integer>',
default=3,
type=int,
@ -177,14 +177,14 @@ def config():
help=('The maximum number of cores to use in dense '
'reconstruction. Default: %(default)s'))
parser.add_argument('--odm_meshing-maxVertexCount',
parser.add_argument('--mesh-size',
metavar='<positive integer>',
default=100000,
type=int,
help=('The maximum vertex count of the output mesh '
'Default: %(default)s'))
parser.add_argument('--odm_meshing-octreeDepth',
parser.add_argument('--mesh-octree-depth',
metavar='<positive integer>',
default=9,
type=int,
@ -192,14 +192,14 @@ def config():
'increase to get more vertices, recommended '
'values are 8-12. Default: %(default)s'))
parser.add_argument('--odm_meshing-samplesPerNode',
parser.add_argument('--mesh-samples',
metavar='<float >= 1.0>',
default=1.0,
type=float,
help=('Number of points per octree node, recommended '
'and default value: %(default)s'))
parser.add_argument('--odm_meshing-solverDivide',
parser.add_argument('--mesh-solver-divide',
metavar='<positive integer>',
default=9,
type=int,
@ -209,78 +209,65 @@ def config():
'times slightly but helps reduce memory usage. '
'Default: %(default)s'))
parser.add_argument('--mvs_texturing-dataTerm',
parser.add_argument('--texturing-data-term',
metavar='<string>',
default='gmi',
help=('Data term: [area, gmi]. Default: %(default)s'))
help=('Data term: [area, gmi]. Default: '
'%(default)s'))
parser.add_argument('--mvs_texturing-outlierRemovalType',
parser.add_argument('--texturing-outlier-removal-type',
metavar='<string>',
default='none',
help=('Type of photometric outlier removal method: '
'[none, gauss_damping, gauss_clamping]. Default: '
'%(default)s'))
parser.add_argument('--mvs_texturing-skipGeometricVisibilityTest',
parser.add_argument('--texturing-skip-visibility-test',
action='store_true',
default=False,
help=('Skip geometric visibility test. Default: %(default)s'))
help=('Skip geometric visibility test. Default: '
' %(default)s'))
parser.add_argument('--mvs_texturing-skipGlobalSeamLeveling',
parser.add_argument('--texturing-skip-global-seam-leveling',
action='store_true',
default=False,
help=('Skip geometric visibility test. Default: %(default)s'))
help=('Skip global seam leveling. Useful for IR data.'
'Default: %(default)s'))
parser.add_argument('--mvs_texturing-skipLocalSeamLeveling',
parser.add_argument('--texturing-skip-local-seam-leveling',
action='store_true',
default=False,
help=('Skip local seam blending. Default: %(default)s'))
help='Skip local seam blending. Default: %(default)s')
parser.add_argument('--mvs_texturing-skipHoleFilling',
parser.add_argument('--texturing-skip-hole-filling',
action='store_true',
default=False,
help=('Skip filling of holes in the mesh. Default: %(default)s'))
help=('Skip filling of holes in the mesh. Default: '
' %(default)s'))
parser.add_argument('--mvs_texturing-keepUnseenFaces',
parser.add_argument('--texturing-keep-unseen-faces',
action='store_true',
default=False,
help=('Keep faces in the mesh that are not seen in any camera. '
'Default: %(default)s'))
# Old odm_texturing arguments
parser.add_argument('--odm_texturing-textureResolution',
metavar='<positive integer>',
default=4096,
type=int,
help=('The resolution of the output textures. Must be '
'greater than textureWithSize. Default: %(default)s'))
parser.add_argument('--odm_texturing-textureWithSize',
metavar='<positive integer>',
default=3600,
type=int,
help=('The resolution to rescale the images performing '
'the texturing. Default: %(default)s'))
# End of old odm_texturing arguments
parser.add_argument('--odm_georeferencing-gcpFile',
parser.add_argument('--gcp',
metavar='<path string>',
default='gcp_list.txt',
default=None,
help=('path to the file containing the ground control '
'points used for georeferencing. Default: '
'%(default)s. The file needs to '
'be on the following line format: \neasting '
'northing height pixelrow pixelcol imagename'))
# Depreciated
parser.add_argument('--odm_georeferencing-useGcp',
action='store_true',
default=False,
help='Enabling GCPs from the file above. The GCP file '
'is not used by default.')
parser.add_argument('--odm_orthophoto-resolution',
parser.add_argument('--orthophoto-resolution',
metavar='<float > 0.0>',
default=20.0,
type=float,

1
run.py
Wyświetl plik

@ -28,6 +28,7 @@ if __name__ == '__main__':
usage()
#If user asks to rerun everything, delete all of the existing progress directories.
# TODO: Move this somewhere it's not hard-coded
if args.rerun_all:
os.system("rm -rf "
+ args.project_path + "images_resize/ "

Wyświetl plik

@ -3,7 +3,6 @@ import os
from opendm import context
from opendm import types
from opendm import config
from opendm import io
from opendm import system
@ -52,26 +51,22 @@ class ODMApp(ecto.BlackBox):
csize=p.args.pmvs_csize,
thresh=p.args.pmvs_threshold,
wsize=p.args.pmvs_wsize,
min_imgs=p.args.pmvs_minImageNum,
min_imgs=p.args.pmvs_min_images,
cores=p.args.pmvs_num_cores),
'meshing': ODMeshingCell(max_vertex=p.args.odm_meshing_maxVertexCount,
oct_tree=p.args.odm_meshing_octreeDepth,
samples=p.args.odm_meshing_samplesPerNode,
solver=p.args.odm_meshing_solverDivide),
'texturing': ODMMvsTexCell(data_term=p.args.mvs_texturing_dataTerm,
outlier_rem_type=p.args.mvs_texturing_outlierRemovalType,
skip_vis_test=p.args.mvs_texturing_skipGeometricVisibilityTest,
skip_glob_seam_leveling=p.args.mvs_texturing_skipGlobalSeamLeveling,
skip_loc_seam_leveling=p.args.mvs_texturing_skipLocalSeamLeveling,
skip_hole_fill=p.args.mvs_texturing_skipHoleFilling,
keep_unseen_faces=p.args.mvs_texturing_keepUnseenFaces),
# Old odm_texturing
# 'texturing': ODMTexturingCell(resize=p.args['resize_to'],
# resolution=p.args['odm_texturing_textureResolution'],
'meshing': ODMeshingCell(max_vertex=p.args.mesh_size,
oct_tree=p.args.mesh_octree_depth,
samples=p.args.mesh_samples,
solver=p.args.mesh_solver_divide),
'texturing': ODMMvsTexCell(data_term=p.args.texturing_data_term,
outlier_rem_type=p.args.texturing_outlier_removal_type,
skip_vis_test=p.args.texturing_skip_visibility_test,
skip_glob_seam_leveling=p.args.texturing_skip_global_seam_leveling,
skip_loc_seam_leveling=p.args.texturing_skip_local_seam_leveling,
skip_hole_fill=p.args.texturing_skip_hole_filling,
keep_unseen_faces=p.args.texturing_keep_unseen_faces),
'georeferencing': ODMGeoreferencingCell(img_size=p.args.resize_to,
gcp_file=p.args.odm_georeferencing_gcpFile,
use_gcp=p.args.odm_georeferencing_useGcp),
'orthophoto': ODMOrthoPhotoCell(resolution=p.args.odm_orthophoto_resolution)
gcp_file=p.args.gcp),
'orthophoto': ODMOrthoPhotoCell(resolution=p.args.orthophoto_resolution)
}