From f8a551701f2a3dfbc55066e0698f731248091463 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Sun, 24 May 2020 18:55:47 +0300 Subject: [PATCH] Minor tweaks --- lib/libstereo/src/algorithms/clustersf.cu | 2 +- lib/libstereo/src/filters/salient_gradient.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libstereo/src/algorithms/clustersf.cu b/lib/libstereo/src/algorithms/clustersf.cu index 27bbd38b3..0ab9900ef 100644 --- a/lib/libstereo/src/algorithms/clustersf.cu +++ b/lib/libstereo/src/algorithms/clustersf.cu @@ -58,7 +58,7 @@ void StereoCSF::compute(cv::InputArray l, cv::InputArray r, cv::OutputArray disp cv::Mat gradtmp; impl_->gl.toGpuMat().download(gradtmp); - cv::imshow("Gradient Left", gradtmp); + //cv::imshow("Gradient Left", gradtmp); cv::Mat tmp; impl_->focal.toGpuMat().download(tmp); diff --git a/lib/libstereo/src/filters/salient_gradient.hpp b/lib/libstereo/src/filters/salient_gradient.hpp index d1bbbcc9d..1c08985d5 100644 --- a/lib/libstereo/src/filters/salient_gradient.hpp +++ b/lib/libstereo/src/filters/salient_gradient.hpp @@ -93,7 +93,7 @@ struct SalientGradient { float weight = weighting(dist, float(radius)); float thresh = gthresh; //max(gthresh, focal_thresh); //for (int u=-3; u<=3; ++u) { - // thresh = (x+u >= 0 && x+u < width) ? max(thresh, float(magnitude(y,x+u))) : thresh; + // thresh = (x+u >= 0 && x+u < width) ? max(thresh, weight*float(magnitude(y,x+u))) : thresh; //} float m = float(magnitude(y,x)) * weight; @@ -104,7 +104,7 @@ struct SalientGradient { buckets.add(y, make_short2(x, a)); } - angle(y,x) = uchar(weight*255.0f); + angle(y,x) = uchar(thresh*weight); } } } -- GitLab