Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
c2ddbcd3
Commit
c2ddbcd3
authored
Sep 18, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1365 from sovrasov:stereo_test_fix
parents
c8f2d2bb
14d3a2ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
29 deletions
+20
-29
perf_bm.cpp
modules/stereo/perf/perf_bm.cpp
+4
-4
perf_descriptor.cpp
modules/stereo/perf/perf_descriptor.cpp
+4
-4
test_block_matching.cpp
modules/stereo/test/test_block_matching.cpp
+6
-11
test_descriptors.cpp
modules/stereo/test/test_descriptors.cpp
+6
-10
No files found.
modules/stereo/perf/perf_bm.cpp
View file @
c2ddbcd3
...
...
@@ -53,8 +53,8 @@ typedef perf::TestBaseWithParam<s_bm_test_t> s_bm;
PERF_TEST_P
(
s_bm
,
sgm_perf
,
testing
::
Combine
(
testing
::
Values
(
cv
::
Size
(
512
,
283
),
cv
::
Size
(
320
,
240
)),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
,
CV_16S
)
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_8U
,
CV_16S
)
)
)
{
...
...
@@ -80,8 +80,8 @@ PERF_TEST_P( s_bm, sgm_perf,
PERF_TEST_P
(
s_bm
,
bm_perf
,
testing
::
Combine
(
testing
::
Values
(
cv
::
Size
(
512
,
383
),
cv
::
Size
(
320
,
240
)
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
)
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_8U
)
)
)
{
...
...
modules/stereo/perf/perf_descriptor.cpp
View file @
c2ddbcd3
...
...
@@ -52,7 +52,7 @@ typedef perf::TestBaseWithParam<descript_params_t> descript_params;
PERF_TEST_P
(
descript_params
,
census_sparse_descriptor
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_32SC4
,
CV_32S
)
)
)
...
...
@@ -74,7 +74,7 @@ PERF_TEST_P( descript_params, census_sparse_descriptor,
PERF_TEST_P
(
descript_params
,
star_census_transform
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_32SC4
,
CV_32S
)
)
)
...
...
@@ -96,7 +96,7 @@ PERF_TEST_P( descript_params, star_census_transform,
PERF_TEST_P
(
descript_params
,
modified_census_transform
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_32SC4
,
CV_32S
)
)
)
...
...
@@ -120,7 +120,7 @@ PERF_TEST_P( descript_params, modified_census_transform,
PERF_TEST_P
(
descript_params
,
center_symetric_census
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8U
C1
,
CV_8U
),
testing
::
Values
(
CV_8U
),
testing
::
Values
(
CV_32SC4
,
CV_32S
)
)
)
...
...
modules/stereo/test/test_block_matching.cpp
View file @
c2ddbcd3
...
...
@@ -83,13 +83,9 @@ static double errorLevel(const Mat &ideal, Mat &actual)
void
CV_BlockMatchingTest
::
run
(
int
)
{
Mat
image1
,
image2
,
gt
;
//some test images can be found in the test data folder
//in order for the tests to build succesfully please replace
//ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
//for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
image1
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2l.bmp"
,
CV_8UC1
);
image2
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2.bmp"
,
CV_8UC1
);
gt
=
imread
(
ts
->
get_data_path
()
+
"testdata/groundtruth.bmp"
,
CV_8UC1
);
image1
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im2.png"
,
IMREAD_GRAYSCALE
);
image2
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im6.png"
,
IMREAD_GRAYSCALE
);
gt
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/disp2.png"
,
IMREAD_GRAYSCALE
);
if
(
image1
.
empty
()
||
image2
.
empty
()
||
gt
.
empty
())
{
...
...
@@ -169,10 +165,9 @@ CV_SGBlockMatchingTest::~CV_SGBlockMatchingTest(){}
void
CV_SGBlockMatchingTest
::
run
(
int
)
{
Mat
image1
,
image2
,
gt
;
//some test images can be found in the test data folder
image1
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2l.bmp"
,
CV_8UC1
);
image2
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2.bmp"
,
CV_8UC1
);
gt
=
imread
(
ts
->
get_data_path
()
+
"testdata/groundtruth.bmp"
,
CV_8UC1
);
image1
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im2.png"
,
IMREAD_GRAYSCALE
);
image2
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im6.png"
,
IMREAD_GRAYSCALE
);
gt
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/disp2.png"
,
IMREAD_GRAYSCALE
);
if
(
image1
.
empty
()
||
image2
.
empty
()
||
gt
.
empty
())
...
...
modules/stereo/test/test_descriptors.cpp
View file @
c2ddbcd3
...
...
@@ -115,12 +115,8 @@ CV_DescriptorBaseTest::~CV_DescriptorBaseTest()
CV_DescriptorBaseTest
::
CV_DescriptorBaseTest
()
{
//read 2 images from file
//some test images can be found in the test data folder
//in order for the tests to build succesfully please replace
//ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
//for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
left
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2l.bmp"
,
CV_8UC1
);
right
=
imread
(
ts
->
get_data_path
()
+
"testdata/imL2.bmp"
,
CV_8UC1
);
left
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im2.png"
,
IMREAD_GRAYSCALE
);
right
=
imread
(
ts
->
get_data_path
()
+
"stereomatching/datasets/tsukuba/im6.png"
,
IMREAD_GRAYSCALE
);
if
(
left
.
empty
()
||
right
.
empty
())
{
...
...
@@ -463,7 +459,7 @@ void CV_DescriptorBaseTest::run(int )
}
}
TEST
(
census_transform_testing
,
accuracy
)
{
CV_CensusTransformTest
test
;
test
.
safe_run
();
}
TEST
(
symetric_census_testing
,
accuracy
)
{
CV_SymetricCensusTest
test
;
test
.
safe_run
();
}
TEST
(
modified_census_testing
,
accuracy
)
{
CV_ModifiedCensusTransformTest
test
;
test
.
safe_run
();
}
TEST
(
star_kernel_testing
,
accuracy
)
{
CV_StarKernelCensusTest
test
;
test
.
safe_run
();
}
TEST
(
DISABLED_
census_transform_testing
,
accuracy
)
{
CV_CensusTransformTest
test
;
test
.
safe_run
();
}
TEST
(
DISABLED_
symetric_census_testing
,
accuracy
)
{
CV_SymetricCensusTest
test
;
test
.
safe_run
();
}
TEST
(
DISABLED_D
modified_census_testing
,
accuracy
)
{
CV_ModifiedCensusTransformTest
test
;
test
.
safe_run
();
}
TEST
(
DISABLED_D
star_kernel_testing
,
accuracy
)
{
CV_StarKernelCensusTest
test
;
test
.
safe_run
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment