Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcseacave committed Jul 2, 2020
2 parents 304bb3c + b6ecabe commit 1de8e4b
Show file tree
Hide file tree
Showing 23 changed files with 708 additions and 140 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is. Use `Viewer` to verify/display the input/output.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PROJECT(OpenMVS)

set(OpenMVS_MAJOR_VERSION 1)
set(OpenMVS_MINOR_VERSION 1)
set(OpenMVS_PATCH_VERSION 0)
set(OpenMVS_PATCH_VERSION 1)
set(OpenMVS_VERSION ${OpenMVS_MAJOR_VERSION}.${OpenMVS_MINOR_VERSION}.${OpenMVS_PATCH_VERSION})

# Find dependencies:
Expand Down
38 changes: 24 additions & 14 deletions MvgMvsPipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@

DEBUG = False

# add current directory to PATH
if sys.platform.startswith('win'):
path_delim = ';'
PATH_DELIM = ';'
else:
path_delim = ':'
os.environ['PATH'] += path_delim + os.getcwd()
PATH_DELIM = ':'

# add this script's directory to PATH
os.environ['PATH'] += PATH_DELIM + os.path.dirname(os.path.abspath(__file__))

# add current directory to PATH
os.environ['PATH'] += PATH_DELIM + os.getcwd()


def whereis(afile):
Expand All @@ -81,15 +85,17 @@ def whereis(afile):
except subprocess.CalledProcessError:
return None


def find(afile):
"""
As whereis look only for executable on linux, this find look for all file type
"""
for d in os.environ['PATH'].split(path_delim):
for d in os.environ['PATH'].split(PATH_DELIM):
if os.path.isfile(os.path.join(d, afile)):
return d
return None


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

PRESET_DEFAULT = 'SEQUENTIAL'


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


# from Python cookbook, #475186
def has_colours(stream):
'''
Expand Down Expand Up @@ -161,13 +167,15 @@ def __init__(self):


class AStep:
""" Represents a process step to be run """
def __init__(self, info, cmd, opt):
self.info = info
self.cmd = cmd
self.opt = opt


class StepsStore:
""" List of steps with facilities to configure them """
def __init__(self):
self.steps_data = [
["Intrinsics analysis", # 0
Expand Down Expand Up @@ -245,29 +253,30 @@ def apply_conf(self, conf):
STEPS = StepsStore()

# ARGS
parser = argparse.ArgumentParser(
PARSER = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
description="Photogrammetry reconstruction with these steps: \r\n" +
"\r\n".join(("\t%i. %s\t %s" % (t, STEPS[t].info, STEPS[t].cmd) for t in range(STEPS.length())))
)
parser.add_argument('input_dir',
PARSER.add_argument('input_dir',
help="the directory wich contains the pictures set.")
parser.add_argument('output_dir',
PARSER.add_argument('output_dir',
help="the directory wich will contain the resulting files.")
parser.add_argument('--steps',
PARSER.add_argument('--steps',
type=int,
nargs="+",
help="steps to process")
parser.add_argument('--preset',
PARSER.add_argument('--preset',
help="steps list preset in \r\n" +
" \r\n".join([k + " = " + str(PRESET[k]) for k in PRESET]) +
" \r\ndefault : " + PRESET_DEFAULT)

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")
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")
for n in range(STEPS.length()):
group.add_argument('--'+str(n), nargs='+')
GROUP.add_argument('--'+str(n), nargs='+')

PARSER.parse_args(namespace=CONF) # store args in the ConfContainer

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

# FOLDERS

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


# Absolute path for input and ouput dirs
CONF.input_dir = os.path.abspath(CONF.input_dir)
CONF.output_dir = os.path.abspath(CONF.output_dir)
Expand Down
7 changes: 2 additions & 5 deletions apps/DensifyPointCloud/DensifyPointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ bool Initialize(size_t argc, LPCTSTR* argv)
unsigned nMinResolution;
unsigned nNumViews;
unsigned nMinViewsFuse;
unsigned nOptimize;
unsigned nEstimateColors;
unsigned nEstimateNormals;
boost::program_options::options_description config("Densify options");
Expand All @@ -103,9 +102,8 @@ bool Initialize(size_t argc, LPCTSTR* argv)
("min-resolution", boost::program_options::value(&nMinResolution)->default_value(640), "do not scale images lower than this resolution")
("number-views", boost::program_options::value(&nNumViews)->default_value(5), "number of views used for depth-map estimation (0 - all neighbor views available)")
("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")
("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)")
("estimate-colors", boost::program_options::value(&nEstimateColors)->default_value(2), "estimate the colors for the dense point-cloud")
("estimate-normals", boost::program_options::value(&nEstimateNormals)->default_value(0), "estimate the normals for the dense point-cloud")
("estimate-colors", boost::program_options::value(&nEstimateColors)->default_value(2), "estimate the colors for the dense point-cloud (0 - disabled, 1 - final, 2 - estimate)")
("estimate-normals", boost::program_options::value(&nEstimateNormals)->default_value(2), "estimate the normals for the dense point-cloud (0 - disabled, 1 - final, 2 - estimate)")
("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)")
("filter-point-cloud", boost::program_options::value(&OPT::thFilterPointCloud)->default_value(0), "filter dense point-cloud based on visibility (0 - disabled)")
("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)")
Expand Down Expand Up @@ -179,7 +177,6 @@ bool Initialize(size_t argc, LPCTSTR* argv)
OPTDENSE::nMinResolution = nMinResolution;
OPTDENSE::nNumViews = nNumViews;
OPTDENSE::nMinViewsFuse = nMinViewsFuse;
OPTDENSE::nOptimize = nOptimize;
OPTDENSE::nEstimateColors = nEstimateColors;
OPTDENSE::nEstimateNormals = nEstimateNormals;
if (!bValidConfig && !OPT::strDenseConfigFileName.IsEmpty())
Expand Down
Loading

0 comments on commit 1de8e4b

Please sign in to comment.