diff --git a/components/operators/src/disparity/fixstars_sgm.cpp b/components/operators/src/disparity/fixstars_sgm.cpp index 6f0599ec446be6171ab92ebad2254a8b5cef4df0..81b1b9083134bbc130ac18fcc9bdf551db11a5e6 100644 --- a/components/operators/src/disparity/fixstars_sgm.cpp +++ b/components/operators/src/disparity/fixstars_sgm.cpp @@ -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), diff --git a/lib/libsgm/src/check_consistency.cu b/lib/libsgm/src/check_consistency.cu index 97cf953b3d2bdcdea0f87a0461d9057e449fd195..dde4f5f290e86db6c73a4ec03e3e44b4eee566d9 100644 --- a/lib/libsgm/src/check_consistency.cu +++ b/lib/libsgm/src/check_consistency.cu @@ -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;