mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
Vertical passes added and we have working parralel version.
This commit is contained in:
parent
20036b82d3
commit
7ffa49e02c
@ -1810,8 +1810,7 @@ public:
|
||||
MODE_SGBM = 0,
|
||||
MODE_HH = 1,
|
||||
MODE_SGBM_3WAY = 2,
|
||||
MODE_HH4 = 3,
|
||||
MODE_HH4_OLD = 4
|
||||
MODE_HH4 = 3
|
||||
};
|
||||
|
||||
CV_WRAP virtual int getPreFilterCap() const = 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -797,23 +797,25 @@ TEST(Calib3d_StereoSGBMPar, idontknowhowtotesthere)
|
||||
// int mode)
|
||||
Mat leftImg = imread("/home/q/Work/GitVault/opencv_extra/testdata/cv/stereomatching/datasets/teddy/im2.png");
|
||||
Mat rightImg = imread("/home/q/Work/GitVault/opencv_extra/testdata/cv/stereomatching/datasets/teddy/im6.png");
|
||||
Mat leftDisp_old, leftDisp_new;
|
||||
// Mat leftDisp_old, leftDisp_new;
|
||||
{
|
||||
Mat leftDisp;
|
||||
Ptr<StereoSGBM> sgbm = StereoSGBM::create( 0, 48, 3, 90, 360, 1, 63, 10, 100, 32, StereoSGBM::MODE_HH);
|
||||
sgbm->compute( leftImg, rightImg, leftDisp);
|
||||
CV_Assert( leftDisp.type() == CV_16SC1 );
|
||||
leftDisp/=8;
|
||||
imwrite( "/home/q/Work/GitVault/modehh4_new.jpg", leftDisp);
|
||||
}
|
||||
{
|
||||
Mat leftDisp;
|
||||
Ptr<StereoSGBM> sgbm = StereoSGBM::create( 0, 48, 3, 90, 360, 1, 63, 10, 100, 32, StereoSGBM::MODE_HH4);
|
||||
sgbm->compute( leftImg, rightImg, leftDisp_new );
|
||||
CV_Assert( leftDisp_new.type() == CV_16SC1 );
|
||||
// leftDisp/=8;
|
||||
// imwrite( "/home/q/Work/GitVault/modehh4_new.jpg", leftDisp);
|
||||
sgbm->compute( leftImg, rightImg, leftDisp);
|
||||
CV_Assert( leftDisp.type() == CV_16SC1 );
|
||||
leftDisp/=8;
|
||||
imwrite( "/home/q/Work/GitVault/modehh4_old.jpg", leftDisp);
|
||||
}
|
||||
{
|
||||
Ptr<StereoSGBM> sgbm = StereoSGBM::create( 0, 48, 3, 90, 360, 1, 63, 10, 100, 32, StereoSGBM::MODE_HH4_OLD);
|
||||
sgbm->compute( leftImg, rightImg, leftDisp_old );
|
||||
CV_Assert( leftDisp_old.type() == CV_16SC1 );
|
||||
// leftDisp/=8;
|
||||
// imwrite( "/home/q/Work/GitVault/modehh4_old.jpg", leftDisp);
|
||||
}
|
||||
Mat diff;
|
||||
absdiff(leftDisp_old,leftDisp_new,diff);
|
||||
CV_Assert( countNonZero(diff)==0);
|
||||
// Mat diff;
|
||||
// absdiff(leftDisp_old,leftDisp_new,diff);
|
||||
// CV_Assert( countNonZero(diff)==0);
|
||||
//
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user