Skip to content

Commit c2ddbcd

Browse files
committed
Merge pull request #1365 from sovrasov:stereo_test_fix
2 parents c8f2d2b + 14d3a2e commit c2ddbcd

File tree

4 files changed

+20
-29
lines changed

4 files changed

+20
-29
lines changed

modules/stereo/perf/perf_bm.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ typedef perf::TestBaseWithParam<s_bm_test_t> s_bm;
5353
PERF_TEST_P( s_bm, sgm_perf,
5454
testing::Combine(
5555
testing::Values( cv::Size(512, 283), cv::Size(320, 240)),
56-
testing::Values( CV_8UC1,CV_8U ),
57-
testing::Values( CV_8UC1,CV_8U,CV_16S )
56+
testing::Values( CV_8U ),
57+
testing::Values( CV_8U,CV_16S )
5858
)
5959
)
6060
{
@@ -80,8 +80,8 @@ PERF_TEST_P( s_bm, sgm_perf,
8080
PERF_TEST_P( s_bm, bm_perf,
8181
testing::Combine(
8282
testing::Values( cv::Size(512, 383), cv::Size(320, 240) ),
83-
testing::Values( CV_8UC1,CV_8U ),
84-
testing::Values( CV_8UC1,CV_8U )
83+
testing::Values( CV_8U ),
84+
testing::Values( CV_8U )
8585
)
8686
)
8787
{

modules/stereo/perf/perf_descriptor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef perf::TestBaseWithParam<descript_params_t> descript_params;
5252
PERF_TEST_P( descript_params, census_sparse_descriptor,
5353
testing::Combine(
5454
testing::Values( TYPICAL_MAT_SIZES ),
55-
testing::Values( CV_8UC1,CV_8U ),
55+
testing::Values( CV_8U ),
5656
testing::Values( CV_32SC4,CV_32S )
5757
)
5858
)
@@ -74,7 +74,7 @@ PERF_TEST_P( descript_params, census_sparse_descriptor,
7474
PERF_TEST_P( descript_params, star_census_transform,
7575
testing::Combine(
7676
testing::Values( TYPICAL_MAT_SIZES ),
77-
testing::Values( CV_8UC1,CV_8U ),
77+
testing::Values( CV_8U ),
7878
testing::Values( CV_32SC4,CV_32S )
7979
)
8080
)
@@ -96,7 +96,7 @@ PERF_TEST_P( descript_params, star_census_transform,
9696
PERF_TEST_P( descript_params, modified_census_transform,
9797
testing::Combine(
9898
testing::Values( TYPICAL_MAT_SIZES ),
99-
testing::Values( CV_8UC1,CV_8U ),
99+
testing::Values( CV_8U ),
100100
testing::Values( CV_32SC4,CV_32S )
101101
)
102102
)
@@ -120,7 +120,7 @@ PERF_TEST_P( descript_params, modified_census_transform,
120120
PERF_TEST_P( descript_params, center_symetric_census,
121121
testing::Combine(
122122
testing::Values( TYPICAL_MAT_SIZES ),
123-
testing::Values( CV_8UC1,CV_8U ),
123+
testing::Values( CV_8U ),
124124
testing::Values( CV_32SC4,CV_32S )
125125
)
126126
)

modules/stereo/test/test_block_matching.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,9 @@ static double errorLevel(const Mat &ideal, Mat &actual)
8383
void CV_BlockMatchingTest::run(int )
8484
{
8585
Mat image1, image2, gt;
86-
//some test images can be found in the test data folder
87-
//in order for the tests to build succesfully please replace
88-
//ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
89-
//for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
90-
image1 = imread(ts->get_data_path() + "testdata/imL2l.bmp", CV_8UC1);
91-
image2 = imread(ts->get_data_path() + "testdata/imL2.bmp", CV_8UC1);
92-
gt = imread(ts->get_data_path() + "testdata/groundtruth.bmp", CV_8UC1);
86+
image1 = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im2.png", IMREAD_GRAYSCALE);
87+
image2 = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im6.png", IMREAD_GRAYSCALE);
88+
gt = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/disp2.png", IMREAD_GRAYSCALE);
9389

9490
if(image1.empty() || image2.empty() || gt.empty())
9591
{
@@ -169,10 +165,9 @@ CV_SGBlockMatchingTest::~CV_SGBlockMatchingTest(){}
169165
void CV_SGBlockMatchingTest::run(int )
170166
{
171167
Mat image1, image2, gt;
172-
//some test images can be found in the test data folder
173-
image1 = imread(ts->get_data_path() + "testdata/imL2l.bmp", CV_8UC1);
174-
image2 = imread(ts->get_data_path() + "testdata/imL2.bmp", CV_8UC1);
175-
gt = imread(ts->get_data_path() + "testdata/groundtruth.bmp", CV_8UC1);
168+
image1 = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im2.png", IMREAD_GRAYSCALE);
169+
image2 = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im6.png", IMREAD_GRAYSCALE);
170+
gt = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/disp2.png", IMREAD_GRAYSCALE);
176171

177172

178173
if(image1.empty() || image2.empty() || gt.empty())

modules/stereo/test/test_descriptors.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,8 @@ CV_DescriptorBaseTest::~CV_DescriptorBaseTest()
115115
CV_DescriptorBaseTest::CV_DescriptorBaseTest()
116116
{
117117
//read 2 images from file
118-
//some test images can be found in the test data folder
119-
//in order for the tests to build succesfully please replace
120-
//ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
121-
//for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
122-
left = imread(ts->get_data_path() + "testdata/imL2l.bmp", CV_8UC1);
123-
right = imread(ts->get_data_path() + "testdata/imL2.bmp", CV_8UC1);
118+
left = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im2.png", IMREAD_GRAYSCALE);
119+
right = imread(ts->get_data_path() + "stereomatching/datasets/tsukuba/im6.png", IMREAD_GRAYSCALE);
124120

125121
if(left.empty() || right.empty())
126122
{
@@ -463,7 +459,7 @@ void CV_DescriptorBaseTest::run(int )
463459
}
464460
}
465461

466-
TEST(census_transform_testing, accuracy) { CV_CensusTransformTest test; test.safe_run(); }
467-
TEST(symetric_census_testing, accuracy) { CV_SymetricCensusTest test; test.safe_run(); }
468-
TEST(modified_census_testing, accuracy) { CV_ModifiedCensusTransformTest test; test.safe_run(); }
469-
TEST(star_kernel_testing, accuracy) { CV_StarKernelCensusTest test; test.safe_run(); }
462+
TEST(DISABLED_census_transform_testing, accuracy) { CV_CensusTransformTest test; test.safe_run(); }
463+
TEST(DISABLED_symetric_census_testing, accuracy) { CV_SymetricCensusTest test; test.safe_run(); }
464+
TEST(DISABLED_Dmodified_census_testing, accuracy) { CV_ModifiedCensusTransformTest test; test.safe_run(); }
465+
TEST(DISABLED_Dstar_kernel_testing, accuracy) { CV_StarKernelCensusTest test; test.safe_run(); }

0 commit comments

Comments
 (0)