Skip to content

Commit 1de8e4b

Browse files
committed
Merge branch 'develop' into master
2 parents 304bb3c + b6ecabe commit 1de8e4b

File tree

23 files changed

+708
-140
lines changed

23 files changed

+708
-140
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is. Use `Viewer` to verify/display the input/output.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PROJECT(OpenMVS)
2020

2121
set(OpenMVS_MAJOR_VERSION 1)
2222
set(OpenMVS_MINOR_VERSION 1)
23-
set(OpenMVS_PATCH_VERSION 0)
23+
set(OpenMVS_PATCH_VERSION 1)
2424
set(OpenMVS_VERSION ${OpenMVS_MAJOR_VERSION}.${OpenMVS_MINOR_VERSION}.${OpenMVS_PATCH_VERSION})
2525

2626
# Find dependencies:

MvgMvsPipeline.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@
5959

6060
DEBUG = False
6161

62-
# add current directory to PATH
6362
if sys.platform.startswith('win'):
64-
path_delim = ';'
63+
PATH_DELIM = ';'
6564
else:
66-
path_delim = ':'
67-
os.environ['PATH'] += path_delim + os.getcwd()
65+
PATH_DELIM = ':'
66+
67+
# add this script's directory to PATH
68+
os.environ['PATH'] += PATH_DELIM + os.path.dirname(os.path.abspath(__file__))
69+
70+
# add current directory to PATH
71+
os.environ['PATH'] += PATH_DELIM + os.getcwd()
6872

6973

7074
def whereis(afile):
@@ -81,15 +85,17 @@ def whereis(afile):
8185
except subprocess.CalledProcessError:
8286
return None
8387

88+
8489
def find(afile):
8590
"""
8691
As whereis look only for executable on linux, this find look for all file type
8792
"""
88-
for d in os.environ['PATH'].split(path_delim):
93+
for d in os.environ['PATH'].split(PATH_DELIM):
8994
if os.path.isfile(os.path.join(d, afile)):
9095
return d
9196
return None
9297

98+
9399
# Try to find openMVG and openMVS binaries in PATH
94100
OPENMVG_BIN = whereis("openMVG_main_SfMInit_ImageListing")
95101
OPENMVS_BIN = whereis("ReconstructMesh")
@@ -115,11 +121,11 @@ def find(afile):
115121

116122
PRESET_DEFAULT = 'SEQUENTIAL'
117123

118-
119124
# HELPERS for terminal colors
120125
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
121126
NO_EFFECT, BOLD, UNDERLINE, BLINK, INVERSE, HIDDEN = (0, 1, 4, 5, 7, 8)
122127

128+
123129
# from Python cookbook, #475186
124130
def has_colours(stream):
125131
'''
@@ -161,13 +167,15 @@ def __init__(self):
161167

162168

163169
class AStep:
170+
""" Represents a process step to be run """
164171
def __init__(self, info, cmd, opt):
165172
self.info = info
166173
self.cmd = cmd
167174
self.opt = opt
168175

169176

170177
class StepsStore:
178+
""" List of steps with facilities to configure them """
171179
def __init__(self):
172180
self.steps_data = [
173181
["Intrinsics analysis", # 0
@@ -245,29 +253,30 @@ def apply_conf(self, conf):
245253
STEPS = StepsStore()
246254

247255
# ARGS
248-
parser = argparse.ArgumentParser(
256+
PARSER = argparse.ArgumentParser(
249257
formatter_class=argparse.RawTextHelpFormatter,
250258
description="Photogrammetry reconstruction with these steps: \r\n" +
251259
"\r\n".join(("\t%i. %s\t %s" % (t, STEPS[t].info, STEPS[t].cmd) for t in range(STEPS.length())))
252260
)
253-
parser.add_argument('input_dir',
261+
PARSER.add_argument('input_dir',
254262
help="the directory wich contains the pictures set.")
255-
parser.add_argument('output_dir',
263+
PARSER.add_argument('output_dir',
256264
help="the directory wich will contain the resulting files.")
257-
parser.add_argument('--steps',
265+
PARSER.add_argument('--steps',
258266
type=int,
259267
nargs="+",
260268
help="steps to process")
261-
parser.add_argument('--preset',
269+
PARSER.add_argument('--preset',
262270
help="steps list preset in \r\n" +
263271
" \r\n".join([k + " = " + str(PRESET[k]) for k in PRESET]) +
264272
" \r\ndefault : " + PRESET_DEFAULT)
265273

266-
group = parser.add_argument_group('Passthrough', description="Option to be passed to command lines (remove - in front of option names)\r\ne.g. --1 p ULTRA to use the ULTRA preset in openMVG_main_ComputeFeatures")
274+
GROUP = PARSER.add_argument_group('Passthrough', description="Option to be passed to command lines (remove - in front of option names)\r\ne.g. --1 p ULTRA to use the ULTRA preset in openMVG_main_ComputeFeatures")
267275
for n in range(STEPS.length()):
268-
group.add_argument('--'+str(n), nargs='+')
276+
GROUP.add_argument('--'+str(n), nargs='+')
277+
278+
PARSER.parse_args(namespace=CONF) # store args in the ConfContainer
269279

270-
parser.parse_args(namespace=CONF) # store args in the ConfContainer
271280

272281
# FOLDERS
273282

@@ -276,6 +285,7 @@ def mkdir_ine(dirname):
276285
if not os.path.exists(dirname):
277286
os.mkdir(dirname)
278287

288+
279289
# Absolute path for input and ouput dirs
280290
CONF.input_dir = os.path.abspath(CONF.input_dir)
281291
CONF.output_dir = os.path.abspath(CONF.output_dir)

apps/DensifyPointCloud/DensifyPointCloud.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ bool Initialize(size_t argc, LPCTSTR* argv)
9191
unsigned nMinResolution;
9292
unsigned nNumViews;
9393
unsigned nMinViewsFuse;
94-
unsigned nOptimize;
9594
unsigned nEstimateColors;
9695
unsigned nEstimateNormals;
9796
boost::program_options::options_description config("Densify options");
@@ -103,9 +102,8 @@ bool Initialize(size_t argc, LPCTSTR* argv)
103102
("min-resolution", boost::program_options::value(&nMinResolution)->default_value(640), "do not scale images lower than this resolution")
104103
("number-views", boost::program_options::value(&nNumViews)->default_value(5), "number of views used for depth-map estimation (0 - all neighbor views available)")
105104
("number-views-fuse", boost::program_options::value(&nMinViewsFuse)->default_value(3), "minimum number of images that agrees with an estimate during fusion in order to consider it inlier")
106-
("optimize", boost::program_options::value(&nOptimize)->default_value(7), "filter used after depth-map estimation (0 - disabled, 1 - remove speckles, 2 - fill gaps, 4 - cross-adjust)")
107-
("estimate-colors", boost::program_options::value(&nEstimateColors)->default_value(2), "estimate the colors for the dense point-cloud")
108-
("estimate-normals", boost::program_options::value(&nEstimateNormals)->default_value(0), "estimate the normals for the dense point-cloud")
105+
("estimate-colors", boost::program_options::value(&nEstimateColors)->default_value(2), "estimate the colors for the dense point-cloud (0 - disabled, 1 - final, 2 - estimate)")
106+
("estimate-normals", boost::program_options::value(&nEstimateNormals)->default_value(2), "estimate the normals for the dense point-cloud (0 - disabled, 1 - final, 2 - estimate)")
109107
("sample-mesh", boost::program_options::value(&OPT::fSampleMesh)->default_value(0.f), "uniformly samples points on a mesh (0 - disabled, <0 - number of points, >0 - sample density per square unit)")
110108
("filter-point-cloud", boost::program_options::value(&OPT::thFilterPointCloud)->default_value(0), "filter dense point-cloud based on visibility (0 - disabled)")
111109
("fusion-mode", boost::program_options::value(&OPT::nFusionMode)->default_value(0), "depth map fusion mode (-2 - fuse disparity-maps, -1 - export disparity-maps only, 0 - depth-maps & fusion, 1 - export depth-maps only)")
@@ -179,7 +177,6 @@ bool Initialize(size_t argc, LPCTSTR* argv)
179177
OPTDENSE::nMinResolution = nMinResolution;
180178
OPTDENSE::nNumViews = nNumViews;
181179
OPTDENSE::nMinViewsFuse = nMinViewsFuse;
182-
OPTDENSE::nOptimize = nOptimize;
183180
OPTDENSE::nEstimateColors = nEstimateColors;
184181
OPTDENSE::nEstimateNormals = nEstimateNormals;
185182
if (!bValidConfig && !OPT::strDenseConfigFileName.IsEmpty())

0 commit comments

Comments
 (0)