diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index f981494cbb54c17524ee062d7ec84446ca8f4da6..553ac66659acffc1c16d8af21f611c685ef62f03 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -247,11 +247,13 @@ static void run(ftl::Configurable *root) { bool busy = false; - // Create the source depth map filters + // Create the source depth map pipeline auto *prefilter = ftl::config::create<ftl::operators::Graph>(root, "pre_filters"); prefilter->append<ftl::operators::ColourChannels>("colour"); prefilter->append<ftl::operators::HFSmoother>("hfnoise"); + // Smooth normals prefilter->append<ftl::operators::SimpleMLS>("mls"); + // Alignment //auto *postfilter = ftl::config::create<ftl::Filters>(root, "post_filters"); //postfilter->create<ftl::filters::DepthSmoother>("hfnoise"); diff --git a/components/operators/src/smoothing.cu b/components/operators/src/smoothing.cu index 903f90a199fb31d017afc1e7dcb5d7ce406848a7..0af17bf4b1920be4ff3647959b0298975912d467 100644 --- a/components/operators/src/smoothing.cu +++ b/components/operators/src/smoothing.cu @@ -68,7 +68,7 @@ using ftl::cuda::TextureObject; // depth_out(screen.x,screen.y) = X.z; //} depth_out(x,y) = X.z; - normals_out(x,y) = make_float4(nX, 0.0f); + normals_out(x,y) = make_float4(nX / length(nX), 0.0f); } void ftl::cuda::mls_smooth(