diff --git a/applications/reconstruct/src/ilw/ilw.cpp b/applications/reconstruct/src/ilw/ilw.cpp index c1a7909a2fcde99eb5a2f8f1d83587969e7c50ae..53fef089088fa99341dd6b012e0eb8960736f5f0 100644 --- a/applications/reconstruct/src/ilw/ilw.cpp +++ b/applications/reconstruct/src/ilw/ilw.cpp @@ -15,13 +15,13 @@ using cv::cuda::GpuMat; ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) { enabled_ = value("ilw_align", true); - iterations_ = value("iterations", 1); - motion_rate_ = value("motion_rate", 0.4f); + iterations_ = value("iterations", 4); + motion_rate_ = value("motion_rate", 0.8f); motion_window_ = value("motion_window", 3); use_lab_ = value("use_Lab", false); params_.colour_smooth = value("colour_smooth", 50.0f); params_.spatial_smooth = value("spatial_smooth", 0.04f); - params_.cost_ratio = value("cost_ratio", 0.75f); + params_.cost_ratio = value("cost_ratio", 0.2f); discon_mask_ = value("discontinuity_mask",2); on("ilw_align", [this](const ftl::config::Event &e) { @@ -29,7 +29,7 @@ ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) { }); on("iterations", [this](const ftl::config::Event &e) { - iterations_ = value("iterations", 1); + iterations_ = value("iterations", 4); }); on("motion_rate", [this](const ftl::config::Event &e) { @@ -57,7 +57,7 @@ ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) { }); on("cost_ratio", [this](const ftl::config::Event &e) { - params_.cost_ratio = value("cost_ratio", 75.0f); + params_.cost_ratio = value("cost_ratio", 0.2f); }); params_.flags = 0; diff --git a/applications/reconstruct/src/ilw/ilw.cu b/applications/reconstruct/src/ilw/ilw.cu index 56855216ac02d0fa74d79f0ac86d2a9f3c36125a..43236e4d85824131e8c8f26ec712b2c05612fd95 100644 --- a/applications/reconstruct/src/ilw/ilw.cu +++ b/applications/reconstruct/src/ilw/ilw.cu @@ -106,10 +106,10 @@ __global__ void correspondence_energy_vector_kernel( if ((params.flags & ftl::cuda::kILWFlag_SkipBadColour) && ccost == 1.0f) continue; // Cost eq 1: summed contributions - //cost = params.cost_ratio * (ccost) + (1.0f - params.cost_ratio) * cost; + cost = params.cost_ratio * (ccost) + (1.0f - params.cost_ratio) * cost; // Cost eq 2: Multiplied - cost = ccost * cost * cost * cost; + //cost = ccost * cost * cost * cost; ++count; avgcost += (params.flags & ftl::cuda::kILWFlag_ColourConfidenceOnly) ? ccost : cost;