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

Allow live depth BL param change

parent 31d74aa7
No related branches found
No related tags found
No related merge requests found
Pipeline #19048 passed
...@@ -57,6 +57,13 @@ DepthBilateralFilter::DepthBilateralFilter(ftl::Configurable* cfg) : ...@@ -57,6 +57,13 @@ DepthBilateralFilter::DepthBilateralFilter(ftl::Configurable* cfg) :
edge_disc_ = cfg->value("edge_discontinuity", 0.04f); edge_disc_ = cfg->value("edge_discontinuity", 0.04f);
max_disc_ = cfg->value("max_discontinuity", 0.1f); max_disc_ = cfg->value("max_discontinuity", 0.1f);
channel_ = Channel::Depth; channel_ = Channel::Depth;
cfg->on("edge_discontinuity", [this](const ftl::config::Event &e) {
edge_disc_ = config()->value("edge_discontinuity", 0.04f);
});
cfg->on("max_discontinuity", [this](const ftl::config::Event &e) {
max_disc_ = config()->value("max_discontinuity", 0.1f);
});
calc_color_weighted_table(table_color_, sigma_range_, 255); calc_color_weighted_table(table_color_, sigma_range_, 255);
...@@ -73,6 +80,13 @@ DepthBilateralFilter::DepthBilateralFilter(ftl::Configurable* cfg, const std::tu ...@@ -73,6 +80,13 @@ DepthBilateralFilter::DepthBilateralFilter(ftl::Configurable* cfg, const std::tu
edge_disc_ = cfg->value("edge_discontinuity", 0.04f); edge_disc_ = cfg->value("edge_discontinuity", 0.04f);
max_disc_ = cfg->value("max_discontinuity", 0.1f); max_disc_ = cfg->value("max_discontinuity", 0.1f);
channel_ = std::get<0>(p); channel_ = std::get<0>(p);
cfg->on("edge_discontinuity", [this](const ftl::config::Event &e) {
edge_disc_ = config()->value("edge_discontinuity", 0.04f);
});
cfg->on("max_discontinuity", [this](const ftl::config::Event &e) {
max_disc_ = config()->value("max_discontinuity", 0.1f);
});
calc_color_weighted_table(table_color_, sigma_range_, 255); calc_color_weighted_table(table_color_, sigma_range_, 255);
......
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