Skip to content

Commit a4d652a

Browse files
committed
viewer: implement ROI selection and manipulation
1 parent 6871967 commit a4d652a

File tree

16 files changed

+1361
-66
lines changed

16 files changed

+1361
-66
lines changed

apps/CreateStructure/CreateStructure.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bool Application::Initialize(size_t argc, LPCTSTR* argv)
114114
), "verbosity level")
115115
#endif
116116
#ifdef _USE_CUDA
117-
("cuda-device", boost::program_options::value(&SEACAVE::CUDA::desiredDeviceID)->default_value(-1), "CUDA device number to be used for depth-map estimation (-2 - CPU/GLSL processing, -1 - best GPU, >=0 - device index)")
117+
("cuda-device", boost::program_options::value<std::string>(&SEACAVE::CUDA::desiredDeviceIDs)->default_value("-1"), "CUDA device(s) for processing (-2 - CPU/GLSL processing, -1 - best GPU, >=0 - comma-separated IDs)")
118118
#endif
119119
;
120120

@@ -252,7 +252,7 @@ int main(int argc, LPCTSTR* argv)
252252
cfg.matchCfg.expandPairsTopK = OPT::expandPairsTopK;
253253
cfg.matchCfg.releaseDescriptors = OPT::releaseDescriptors;
254254
#ifdef _USE_CUDA
255-
cfg.matchCfg.useCUDA = cfg.featuresCfg.useCUDA = (SEACAVE::CUDA::desiredDeviceID > -2);
255+
cfg.matchCfg.useCUDA = cfg.featuresCfg.useCUDA = !SEACAVE::CUDA::desiredDeviceIDs.empty();
256256
#endif
257257
cfg.matchImagesOnly = OPT::matchImagesOnly;
258258
cfg.viewgraphCfg.maxTwoViewError = 0; // disable pair filtering after ViewGraph calibration

apps/ExtractKeyframes/ExtractKeyframes.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ bool Application::Initialize(size_t argc, LPCTSTR* argv)
101101
), "verbosity level")
102102
#endif
103103
#ifdef _USE_CUDA
104-
("cuda-device", boost::program_options::value(&SEACAVE::CUDA::desiredDeviceID)->default_value(-1), "CUDA device number to be used for depth-map estimation (-2 - CPU/GLSL processing, -1 - best GPU, >=0 - device index)")
104+
("cuda-device", boost::program_options::value<std::string>(&SEACAVE::CUDA::desiredDeviceIDs)->default_value("-1"), "CUDA device(s) for processing (-2 - CPU/GLSL processing, -1 - best GPU, >=0 - comma-separated IDs)")
105105
#endif
106106
;
107107

@@ -227,7 +227,7 @@ int main(int argc, LPCTSTR* argv)
227227
config.cameraType = (CameraType)(OPT::nCameraType+1);
228228
config.refineCalibration = (KeyframeConfig::RefineCalibrationType)OPT::nRefineCalibration;
229229
#ifdef _USE_CUDA
230-
config.useCUDA = (SEACAVE::CUDA::desiredDeviceID > -2);
230+
config.useCUDA = !SEACAVE::CUDA::desiredDeviceIDs.empty();
231231
#endif
232232

233233
VERBOSE("Keyframe Extraction Configuration:");
@@ -245,8 +245,8 @@ int main(int argc, LPCTSTR* argv)
245245
VERBOSE(" Principal point offset: (%.2f, %.2f) pixels", config.ppOffsetX, config.ppOffsetY);
246246
} else {
247247
VERBOSE(" Focal length: auto-calibrate from fundamental matrices");
248-
VERBOSE(" Principal point: image center%s",
249-
(config.ppOffsetX != 0 || config.ppOffsetY != 0) ?
248+
VERBOSE(" Principal point: image center%s",
249+
(config.ppOffsetX != 0 || config.ppOffsetY != 0) ?
250250
String::FormatString(" + offset (%.2f, %.2f)", config.ppOffsetX, config.ppOffsetY).c_str() : "");
251251
}
252252

apps/Tests/TestsMVS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool PipelineTest(bool verbose)
5151
TD_TIMER_START();
5252
#if 0 && defined(_USE_CUDA)
5353
// force CPU for testing even if CUDA is available
54-
SEACAVE::CUDA::desiredDeviceID = -2;
54+
SEACAVE::CUDA::desiredDeviceIDs.clear();
5555
#endif
5656
Scene scene;
5757
if (!scene.Load(MAKE_PATH("scene.mvs"))) {

0 commit comments

Comments
 (0)