Skip to content
Snippets Groups Projects
Commit 15dbd484 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix for config value getting

parent d09f4a76
No related branches found
No related tags found
No related merge requests found
Pipeline #11396 passed
......@@ -15,7 +15,7 @@ public:
CUDARayCastSDF(nlohmann::json& config) : ftl::Configurable(config) {
auto &cfg = ftl::config::resolve(config);
create(parametersFromConfig(cfg));
hash_render_ = cfg.value("hash_renderer", false);
hash_render_ = value("hash_renderer", false);
}
~CUDARayCastSDF(void) {
......
......@@ -21,7 +21,7 @@ Display::Display(nlohmann::json &config, std::string name) : ftl::Configurable(c
//cv::namedWindow("Image", cv::WINDOW_KEEPRATIO);
#if defined HAVE_PCL
if (config.value("points", false)) {
if (value("points", false)) {
pclviz_ = pcl::visualization::PCLVisualizer::Ptr(new pcl::visualization::PCLVisualizer ("FTL Cloud: " + name));
pclviz_->setBackgroundColor (255, 255, 255);
pclviz_->addCoordinateSystem (1.0);
......
......@@ -42,7 +42,7 @@ static void setMouseAction(const std::string& winName, const MouseAction &action
}
Display::Display(nlohmann::json &config) : ftl::Configurable(config) {
name_ = config.value("name", string("View [")+std::to_string(viewcount__)+string("]"));
name_ = value("name", string("View [")+std::to_string(viewcount__)+string("]"));
viewcount__++;
init();
......@@ -50,7 +50,7 @@ Display::Display(nlohmann::json &config) : ftl::Configurable(config) {
Display::Display(nlohmann::json &config, Source *source)
: ftl::Configurable(config) {
name_ = config.value("name", string("View [")+std::to_string(viewcount__)+string("]"));
name_ = value("name", string("View [")+std::to_string(viewcount__)+string("]"));
viewcount__++;
init();
}
......
......@@ -11,10 +11,10 @@ using cv::Mat;
FixstarsSGM::FixstarsSGM(nlohmann::json &config) : Disparity(config) {
ssgm_ = nullptr;
use_filter_ = config.value("use_filter", false);
use_filter_ = value("use_filter", false);
// note: (max_disp_ << 4) libsgm subpixel accuracy.
// What is the impact in the filter? (possible artifacts)
filter_ = cv::cuda::createDisparityBilateralFilter(max_disp_ << 4, config.value("filter_radius", 25), config.value("filter_iter", 1));
filter_ = cv::cuda::createDisparityBilateralFilter(max_disp_ << 4, value("filter_radius", 25), value("filter_iter", 1));
}
void FixstarsSGM::compute(const cv::Mat &l, const cv::Mat &r, cv::Mat &disp) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment