Skip to content
Snippets Groups Projects
Commit 7a0724d6 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

libSGM bad disparity hack

parent 9cd7f948
No related branches found
No related tags found
No related merge requests found
......@@ -33,9 +33,12 @@ void FixstarsSGM::compute(const cv::Mat &l, const cv::Mat &r, cv::Mat &disp) {
//std::chrono::duration<double> elapsed =
// std::chrono::high_resolution_clock::now() - start;
//LOG(INFO) << "CUDA sgm in " << elapsed.count() << "s";
// todo: fix libSGM (return float data or provide mask separately)
// (256 << 5) coded in libSGM consistency check
Mat bad_pixels = (disp == (256 << 5));
disp.convertTo(disp, CV_32F, 1.0f/16.0f);
}
disp.setTo(0, bad_pixels); // decide how bad values should be represented
disp.convertTo(disp, CV_32F, 1.0f/16.0f);
}
\ No newline at end of file
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