Commit dea5eaca authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #8660 from 4ekmah:making_sgbm_parallel

parents 5950431e d6bc6895
......@@ -1862,7 +1862,8 @@ public:
{
MODE_SGBM = 0,
MODE_HH = 1,
MODE_SGBM_3WAY = 2
MODE_SGBM_3WAY = 2,
MODE_HH4 = 3
};
CV_WRAP virtual int getPreFilterCap() const = 0;
......
This diff is collapsed.
......@@ -784,3 +784,22 @@ protected:
TEST(Calib3d_StereoBM, regression) { CV_StereoBMTest test; test.safe_run(); }
TEST(Calib3d_StereoSGBM, regression) { CV_StereoSGBMTest test; test.safe_run(); }
TEST(Calib3d_StereoSGBM_HH4, regression)
{
String path = cvtest::TS::ptr()->get_data_path() + "cv/stereomatching/datasets/teddy/";
Mat leftImg = imread(path + "im2.png", 0);
Mat rightImg = imread(path + "im6.png", 0);
Mat testData = imread(path + "disp2_hh4.png",-1);
Mat leftDisp;
Mat toCheck;
{
Ptr<StereoSGBM> sgbm = StereoSGBM::create( 0, 48, 3, 90, 360, 1, 63, 10, 100, 32, StereoSGBM::MODE_HH4);
sgbm->compute( leftImg, rightImg, leftDisp);
CV_Assert( leftDisp.type() == CV_16SC1 );
leftDisp.convertTo(toCheck, CV_16UC1,1,16);
}
Mat diff;
absdiff(toCheck, testData,diff);
CV_Assert( countNonZero(diff)==0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment