Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose --cuda-device option in DensifyPointCloud #707

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/DensifyPointCloud/DensifyPointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ bool Initialize(size_t argc, LPCTSTR* argv)

// group of options allowed both on command line and in config file
unsigned nResolutionLevel;
#ifdef _USE_CUDA
unsigned nCUDADevice;
#endif
unsigned nMaxResolution;
unsigned nMinResolution;
unsigned nNumViews;
Expand All @@ -103,6 +106,9 @@ bool Initialize(size_t argc, LPCTSTR* argv)
("input-file,i", boost::program_options::value<std::string>(&OPT::strInputFileName), "input filename containing camera poses and image list")
("output-file,o", boost::program_options::value<std::string>(&OPT::strOutputFileName), "output filename for storing the dense point-cloud")
("resolution-level", boost::program_options::value(&nResolutionLevel)->default_value(1), "how many times to scale down the images before point cloud computation")
#ifdef _USE_CUDA
("cuda-device", boost::program_options::value(&nCUDADevice)->default_value(0), "CUDA device number to be used for depth-map estimation (-1 - CPU processing)")
#endif
("max-resolution", boost::program_options::value(&nMaxResolution)->default_value(3200), "do not scale images higher than this resolution")
("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)")
Expand Down Expand Up @@ -181,6 +187,9 @@ bool Initialize(size_t argc, LPCTSTR* argv)
const bool bValidConfig(OPTDENSE::oConfig.Load(OPT::strDenseConfigFileName));
OPTDENSE::update();
OPTDENSE::nResolutionLevel = nResolutionLevel;
#ifdef _USE_CUDA
OPTDENSE::nCUDADevice = nCUDADevice;
#endif
OPTDENSE::nMaxResolution = nMaxResolution;
OPTDENSE::nMinResolution = nMinResolution;
OPTDENSE::nNumViews = nNumViews;
Expand Down