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

Increase disparity threshold

parent 3579ac53
No related branches found
No related tags found
1 merge request!345Implements #379 Min Disparity in SGM
Pipeline #29612 passed
......@@ -62,7 +62,7 @@ FixstarsSGM::FixstarsSGM(ftl::operators::Graph *g, ftl::Configurable* cfg) :
uniqueness_ = cfg->value("uniqueness", 0.95f);
P1_ = cfg->value("P1", 10);
P2_ = cfg->value("P2", 120);
max_disp_ = cfg->value("max_disp", 256);
max_disp_ = cfg->value("num_disp", 256);
if (uniqueness_ < 0.0 || uniqueness_ > 1.0) {
uniqueness_ = 1.0;
......@@ -228,7 +228,7 @@ bool FixstarsSGM::apply(Frame &in, Frame &out, cudaStream_t stream) {
ftl::cuda::merge_disparities(disp_int_, disp, stream);
}
cv::cuda::threshold(disp_int_, disp, 4096.0f, 0.0f, cv::THRESH_TOZERO_INV, cvstream);
cv::cuda::threshold(disp_int_, disp, 16383.0f, 0.0f, cv::THRESH_TOZERO_INV, cvstream);
if (config()->value("check_reprojection", false)) {
ftl::cuda::check_reprojection(disp, in.getTexture<uchar4>(Channel::Colour),
......
......@@ -37,7 +37,7 @@ namespace {
int diff = abs(d_rightDisp[i * dst_pitch + k] - d);
if (mask != 0 || diff > 1) {
// masked or left-right inconsistent pixel -> invalid
dout = (256 << (sgm::StereoSGM::SUBPIXEL_SHIFT+1));
dout = (1024 << (sgm::StereoSGM::SUBPIXEL_SHIFT));
}
}
d_leftDisp[i * dst_pitch + j] = dout;
......
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