diff --git a/components/operators/src/smoothchan.cu b/components/operators/src/smoothchan.cu index 08fc3cb43a0f48dcace0bac7dd679144016d5a1c..af9ec35243ed6304f859ab16c2177aa761c8eb14 100644 --- a/components/operators/src/smoothchan.cu +++ b/components/operators/src/smoothchan.cu @@ -24,7 +24,7 @@ __global__ void smooth_chan_kernel( // A distance has already been found if (smoothing_out(x,y) < 1.0f) return; - float mindist = 50.0f; + float mindist = 100.0f; const uchar4 c0 = colour_in.tex2D(ix, iy); //const float d0 = depth_in.tex2D(ix, iy); @@ -46,13 +46,13 @@ __global__ void smooth_chan_kernel( } } - smoothing_out(x,y) = min(mindist / 50.0f, 1.0f); + smoothing_out(x,y) = min(mindist / 100.0f, 1.0f); } } void ftl::cuda::smooth_channel( ftl::cuda::TextureObject<uchar4> &colour_in, - ftl::cuda::TextureObject<float> &depth_in, + //ftl::cuda::TextureObject<float> &depth_in, ftl::cuda::TextureObject<float> &smoothing_out, const ftl::rgbd::Camera &camera, float alpha, diff --git a/components/operators/src/smoothing.cpp b/components/operators/src/smoothing.cpp index bb3b70677393ac7f15ccc6cc3fd533c65fdc19b7..77259b8de216fe022a657e87854446af950acf82 100644 --- a/components/operators/src/smoothing.cpp +++ b/components/operators/src/smoothing.cpp @@ -85,7 +85,7 @@ bool SmoothChannel::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, ftl::rgbd // Reduce to nearest ftl::cuda::smooth_channel( in.createTexture<uchar4>(Channel::Colour), - in.createTexture<float>(Channel::Depth), + //in.createTexture<float>(Channel::Depth), out.createTexture<float>(Channel::Smoothing), s->parameters(), threshold, @@ -103,11 +103,11 @@ bool SmoothChannel::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, ftl::rgbd // Downscale images for next pass cv::cuda::resize(in.get<GpuMat>(Channel::Colour), temp_[i].create<GpuMat>(Channel::Colour), cv::Size(width, height), 0.0, 0.0, cv::INTER_LINEAR); - cv::cuda::resize(in.get<GpuMat>(Channel::Depth), temp_[i].create<GpuMat>(Channel::Depth), cv::Size(width, height), 0.0, 0.0, cv::INTER_NEAREST); + //cv::cuda::resize(in.get<GpuMat>(Channel::Depth), temp_[i].create<GpuMat>(Channel::Depth), cv::Size(width, height), 0.0, 0.0, cv::INTER_NEAREST); ftl::cuda::smooth_channel( temp_[i].createTexture<uchar4>(Channel::Colour), - temp_[i].createTexture<float>(Channel::Depth), + //temp_[i].createTexture<float>(Channel::Depth), out.getTexture<float>(Channel::Smoothing), scaledCam, threshold, diff --git a/components/operators/src/smoothing_cuda.hpp b/components/operators/src/smoothing_cuda.hpp index 1b5079d1c94b5164f024aacde9d3e4897fc87f11..67de60801fb7294997e4ed55ff565313df99c313 100644 --- a/components/operators/src/smoothing_cuda.hpp +++ b/components/operators/src/smoothing_cuda.hpp @@ -31,7 +31,7 @@ void colour_mls_smooth( void smooth_channel( ftl::cuda::TextureObject<uchar4> &colour_in, - ftl::cuda::TextureObject<float> &depth_in, + //ftl::cuda::TextureObject<float> &depth_in, ftl::cuda::TextureObject<float> &smoothing_out, const ftl::rgbd::Camera &camera, float alpha,