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
1c0cb8b5
Commit
1c0cb8b5
authored
Sep 08, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #360 from mshabunin:fix-contrib-tests
parents
4f860dcf
94e777ba
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
60 additions
and
70 deletions
+60
-70
perf_descriptors.cpp
modules/line_descriptor/perf/perf_descriptors.cpp
+1
-1
perf_detection.cpp
modules/line_descriptor/perf/perf_detection.cpp
+2
-2
perf_matching.cpp
modules/line_descriptor/perf/perf_matching.cpp
+3
-3
perf_reg.cpp
modules/reg/perf/perf_reg.cpp
+5
-5
perf_daisy.cpp
modules/xfeatures2d/perf/perf_daisy.cpp
+1
-1
perf_latch.cpp
modules/xfeatures2d/perf/perf_latch.cpp
+1
-1
perf_surf.cpp
modules/xfeatures2d/perf/perf_surf.cpp
+3
-4
perf_surf.ocl.cpp
modules/xfeatures2d/perf/perf_surf.ocl.cpp
+2
-4
perf_adaptive_manifold.cpp
modules/ximgproc/perf/perf_adaptive_manifold.cpp
+1
-1
perf_disparity_wls_filter.cpp
modules/ximgproc/perf/perf_disparity_wls_filter.cpp
+1
-1
perf_domain_transform.cpp
modules/ximgproc/perf/perf_domain_transform.cpp
+2
-3
perf_fast_hough_transform.cpp
modules/ximgproc/perf/perf_fast_hough_transform.cpp
+1
-1
perf_fgs_filter.cpp
modules/ximgproc/perf/perf_fgs_filter.cpp
+1
-1
perf_guided_filter.cpp
modules/ximgproc/perf/perf_guided_filter.cpp
+2
-2
pref_joint_bilateral_filter.cpp
modules/ximgproc/perf/pref_joint_bilateral_filter.cpp
+2
-2
test_adaptive_manifold.cpp
modules/ximgproc/test/test_adaptive_manifold.cpp
+4
-4
test_disparity_wls_filter.cpp
modules/ximgproc/test/test_disparity_wls_filter.cpp
+0
-0
test_domain_transform.cpp
modules/ximgproc/test/test_domain_transform.cpp
+1
-1
test_fast_hough_transform.cpp
modules/ximgproc/test/test_fast_hough_transform.cpp
+2
-2
test_fgs_filter.cpp
modules/ximgproc/test/test_fgs_filter.cpp
+2
-2
test_guided_filter.cpp
modules/ximgproc/test/test_guided_filter.cpp
+9
-10
test_joint_bilateral_filter.cpp
modules/ximgproc/test/test_joint_bilateral_filter.cpp
+14
-19
No files found.
modules/line_descriptor/perf/perf_descriptors.cpp
View file @
1c0cb8b5
...
@@ -72,6 +72,6 @@ PERF_TEST_P(file_str, descriptors, testing::Values(IMAGES))
...
@@ -72,6 +72,6 @@ PERF_TEST_P(file_str, descriptors, testing::Values(IMAGES))
bd
->
compute
(
frame
,
keylines
,
descriptors
);
bd
->
compute
(
frame
,
keylines
,
descriptors
);
}
}
SANITY_CHECK
(
descriptors
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/line_descriptor/perf/perf_detection.cpp
View file @
1c0cb8b5
...
@@ -109,7 +109,7 @@ PERF_TEST_P(file_str, detect, testing::Values(IMAGES))
...
@@ -109,7 +109,7 @@ PERF_TEST_P(file_str, detect, testing::Values(IMAGES))
createMatFromVec
(
keylines
,
lines
);
createMatFromVec
(
keylines
,
lines
);
}
}
SANITY_CHECK
(
lines
);
SANITY_CHECK
_NOTHING
(
);
}
}
...
@@ -133,6 +133,6 @@ PERF_TEST_P(file_str, detect_lsd, testing::Values(IMAGES))
...
@@ -133,6 +133,6 @@ PERF_TEST_P(file_str, detect_lsd, testing::Values(IMAGES))
createMatFromVec
(
keylines
,
lines
);
createMatFromVec
(
keylines
,
lines
);
}
}
SANITY_CHECK
(
lines
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/line_descriptor/perf/perf_matching.cpp
View file @
1c0cb8b5
...
@@ -138,7 +138,7 @@ PERF_TEST(matching, single_match)
...
@@ -138,7 +138,7 @@ PERF_TEST(matching, single_match)
TEST_CYCLE
()
TEST_CYCLE
()
bd
->
match
(
query
,
train
,
dm
);
bd
->
match
(
query
,
train
,
dm
);
SANITY_CHECK_
MATCHES
(
dm
);
SANITY_CHECK_
NOTHING
(
);
}
}
...
@@ -160,7 +160,7 @@ PERF_TEST(knn_matching, knn_match_distances_test)
...
@@ -160,7 +160,7 @@ PERF_TEST(knn_matching, knn_match_distances_test)
}
}
}
}
SANITY_CHECK
(
distances
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST
(
radius_match
,
radius_match_distances_test
)
PERF_TEST
(
radius_match
,
radius_match_distances_test
)
...
@@ -181,7 +181,7 @@ PERF_TEST(radius_match, radius_match_distances_test)
...
@@ -181,7 +181,7 @@ PERF_TEST(radius_match, radius_match_distances_test)
}
}
}
}
SANITY_CHECK
(
distances
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/reg/perf/perf_reg.cpp
View file @
1c0cb8b5
...
@@ -205,7 +205,7 @@ PERF_TEST_P(Size_MatType, Registration_Shift,
...
@@ -205,7 +205,7 @@ PERF_TEST_P(Size_MatType, Registration_Shift,
TEST_CYCLE
()
shift
=
perfShift
(
frame
);
TEST_CYCLE
()
shift
=
perfShift
(
frame
);
SANITY_CHECK
(
shift
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST_P
(
Size_MatType
,
Registration_Euclidean
,
PERF_TEST_P
(
Size_MatType
,
Registration_Euclidean
,
...
@@ -223,7 +223,7 @@ PERF_TEST_P(Size_MatType, Registration_Euclidean,
...
@@ -223,7 +223,7 @@ PERF_TEST_P(Size_MatType, Registration_Euclidean,
TEST_CYCLE
()
result
=
perfEuclidean
(
frame
);
TEST_CYCLE
()
result
=
perfEuclidean
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST_P
(
Size_MatType
,
Registration_Similarity
,
PERF_TEST_P
(
Size_MatType
,
Registration_Similarity
,
...
@@ -241,7 +241,7 @@ PERF_TEST_P(Size_MatType, Registration_Similarity,
...
@@ -241,7 +241,7 @@ PERF_TEST_P(Size_MatType, Registration_Similarity,
TEST_CYCLE
()
result
=
perfSimilarity
(
frame
);
TEST_CYCLE
()
result
=
perfSimilarity
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST_P
(
Size_MatType
,
Registration_Affine
,
PERF_TEST_P
(
Size_MatType
,
Registration_Affine
,
...
@@ -259,7 +259,7 @@ PERF_TEST_P(Size_MatType, Registration_Affine,
...
@@ -259,7 +259,7 @@ PERF_TEST_P(Size_MatType, Registration_Affine,
TEST_CYCLE
()
result
=
perfAffine
(
frame
);
TEST_CYCLE
()
result
=
perfAffine
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST_P
(
Size_MatType
,
Registration_Projective
,
PERF_TEST_P
(
Size_MatType
,
Registration_Projective
,
...
@@ -277,5 +277,5 @@ PERF_TEST_P(Size_MatType, Registration_Projective,
...
@@ -277,5 +277,5 @@ PERF_TEST_P(Size_MatType, Registration_Projective,
TEST_CYCLE
()
result
=
perfProjective
(
frame
);
TEST_CYCLE
()
result
=
perfProjective
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/xfeatures2d/perf/perf_daisy.cpp
View file @
1c0cb8b5
...
@@ -29,5 +29,5 @@ PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
...
@@ -29,5 +29,5 @@ PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
// compute all daisies in image
// compute all daisies in image
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
descriptors
);
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/xfeatures2d/perf/perf_latch.cpp
View file @
1c0cb8b5
...
@@ -30,5 +30,5 @@ PERF_TEST_P(latch, extract, testing::Values(LATCH_IMAGES))
...
@@ -30,5 +30,5 @@ PERF_TEST_P(latch, extract, testing::Values(LATCH_IMAGES))
vector
<
uchar
>
descriptors
;
vector
<
uchar
>
descriptors
;
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
points
,
descriptors
);
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
}
modules/xfeatures2d/perf/perf_surf.cpp
View file @
1c0cb8b5
...
@@ -26,7 +26,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
...
@@ -26,7 +26,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
->
detect
(
frame
,
points
,
mask
);
TEST_CYCLE
()
detector
->
detect
(
frame
,
points
,
mask
);
SANITY_CHECK_
KEYPOINTS
(
points
,
1e-3
);
SANITY_CHECK_
NOTHING
(
);
}
}
PERF_TEST_P
(
surf
,
extract
,
testing
::
Values
(
SURF_IMAGES
))
PERF_TEST_P
(
surf
,
extract
,
testing
::
Values
(
SURF_IMAGES
))
...
@@ -45,7 +45,7 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
...
@@ -45,7 +45,7 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
->
compute
(
frame
,
points
,
descriptors
);
TEST_CYCLE
()
detector
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
}
PERF_TEST_P
(
surf
,
full
,
testing
::
Values
(
SURF_IMAGES
))
PERF_TEST_P
(
surf
,
full
,
testing
::
Values
(
SURF_IMAGES
))
...
@@ -62,6 +62,5 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
...
@@ -62,6 +62,5 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
->
detectAndCompute
(
frame
,
mask
,
points
,
descriptors
,
false
);
TEST_CYCLE
()
detector
->
detectAndCompute
(
frame
,
mask
,
points
,
descriptors
,
false
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
SANITY_CHECK_NOTHING
();
SANITY_CHECK
(
descriptors
,
1e-4
);
}
}
modules/xfeatures2d/perf/perf_surf.ocl.cpp
View file @
1c0cb8b5
...
@@ -81,8 +81,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_with_data_transfer, testing::Values(SURF_IMAGES))
...
@@ -81,8 +81,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_with_data_transfer, testing::Values(SURF_IMAGES))
d_descriptors
.
download
(
cpu_dp
);
d_descriptors
.
download
(
cpu_dp
);
}
}
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK_NOTHING
();
SANITY_CHECK
(
cpu_dp
,
1
);
}
}
PERF_TEST_P
(
OCL_SURF
,
DISABLED_without_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
PERF_TEST_P
(
OCL_SURF
,
DISABLED_without_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
...
@@ -104,8 +103,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGE
...
@@ -104,8 +103,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGE
Mat
cpu_dp
;
Mat
cpu_dp
;
d_keypoints
.
download
(
cpu_kp
);
d_keypoints
.
download
(
cpu_kp
);
d_descriptors
.
download
(
cpu_dp
);
d_descriptors
.
download
(
cpu_dp
);
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK_NOTHING
();
SANITY_CHECK
(
cpu_dp
,
1
);
}
}
#endif // HAVE_OPENCV_OCL
#endif // HAVE_OPENCV_OCL
modules/ximgproc/perf/perf_adaptive_manifold.cpp
View file @
1c0cb8b5
...
@@ -87,7 +87,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
...
@@ -87,7 +87,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
sigma_r
/=
1.38
;
sigma_r
/=
1.38
;
}
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
}
}
modules/ximgproc/perf/perf_disparity_wls_filter.cpp
View file @
1c0cb8b5
...
@@ -89,7 +89,7 @@ PERF_TEST_P( DisparityWLSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTyp
...
@@ -89,7 +89,7 @@ PERF_TEST_P( DisparityWLSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTyp
wls_filter
->
filter
(
disp_left
,
guide
,
dst
,
disp_right
,
ROI
);
wls_filter
->
filter
(
disp_left
,
guide
,
dst
,
disp_right
,
ROI
);
}
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
void
MakeArtificialExample
(
RNG
rng
,
Mat
&
dst_left_view
,
Mat
&
dst_left_disparity_map
,
Mat
&
dst_right_disparity_map
,
Rect
&
dst_ROI
)
void
MakeArtificialExample
(
RNG
rng
,
Mat
&
dst_left_view
,
Mat
&
dst_left_disparity_map
,
Mat
&
dst_right_disparity_map
,
Rect
&
dst_ROI
)
...
...
modules/ximgproc/perf/perf_domain_transform.cpp
View file @
1c0cb8b5
...
@@ -47,7 +47,7 @@ using namespace cv;
...
@@ -47,7 +47,7 @@ using namespace cv;
using
namespace
cv
::
ximgproc
;
using
namespace
cv
::
ximgproc
;
CV_ENUM
(
GuideMatType
,
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
)
//reduced set
CV_ENUM
(
GuideMatType
,
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
)
//reduced set
CV_ENUM
(
SourceMatType
,
CV_8UC1
,
CV_8UC
2
,
CV_8UC3
,
CV_8UC4
,
CV_32FC1
,
CV_32FC2
,
CV_32FC3
,
CV_32FC4
)
//full support
ed set
CV_ENUM
(
SourceMatType
,
CV_8UC1
,
CV_8UC
3
,
CV_8UC4
,
CV_32FC1
,
CV_32FC3
)
//reduc
ed set
CV_ENUM
(
DTFMode
,
DTF_NC
,
DTF_IC
,
DTF_RF
)
CV_ENUM
(
DTFMode
,
DTF_NC
,
DTF_IC
,
DTF_RF
)
typedef
tuple
<
GuideMatType
,
SourceMatType
,
Size
,
double
,
double
,
DTFMode
>
DTTestParams
;
typedef
tuple
<
GuideMatType
,
SourceMatType
,
Size
,
double
,
double
,
DTFMode
>
DTTestParams
;
...
@@ -82,8 +82,7 @@ PERF_TEST_P( DomainTransformTest, perf,
...
@@ -82,8 +82,7 @@ PERF_TEST_P( DomainTransformTest, perf,
{
{
dtFilter
(
guide
,
src
,
dst
,
sigmaSpatial
,
sigmaColor
,
dtfType
);
dtFilter
(
guide
,
src
,
dst
,
sigmaSpatial
,
sigmaColor
,
dtfType
);
}
}
SANITY_CHECK_NOTHING
();
SANITY_CHECK
(
dst
);
}
}
}
}
modules/ximgproc/perf/perf_fast_hough_transform.cpp
View file @
1c0cb8b5
...
@@ -58,7 +58,7 @@ typedef std::tr1::tuple<Size, MatType, MatDepth> srcSize_srcType_dstDepth_t;
...
@@ -58,7 +58,7 @@ typedef std::tr1::tuple<Size, MatType, MatDepth> srcSize_srcType_dstDepth_t;
typedef
perf
::
TestBaseWithParam
<
srcSize_srcType_dstDepth_t
>
typedef
perf
::
TestBaseWithParam
<
srcSize_srcType_dstDepth_t
>
srcSize_srcType_dstDepth
;
srcSize_srcType_dstDepth
;
#define ALL_MAT_DEPHTS CV_8U, CV_8S, CV_16U, CV_
16S, CV_
32S, CV_32F, CV_64F
#define ALL_MAT_DEPHTS CV_8U, CV_8S, CV_16U, CV_32S, CV_32F, CV_64F
PERF_TEST_P
(
srcSize_srcType_dstDepth
,
FastHoughTransform
,
PERF_TEST_P
(
srcSize_srcType_dstDepth
,
FastHoughTransform
,
testing
::
Combine
(
testing
::
Combine
(
...
...
modules/ximgproc/perf/perf_fgs_filter.cpp
View file @
1c0cb8b5
...
@@ -75,7 +75,7 @@ PERF_TEST_P( FGSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::all()
...
@@ -75,7 +75,7 @@ PERF_TEST_P( FGSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::all()
fastGlobalSmootherFilter
(
guide
,
src
,
dst
,
lambda
,
sigma
);
fastGlobalSmootherFilter
(
guide
,
src
,
dst
,
lambda
,
sigma
);
}
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
}
}
modules/ximgproc/perf/perf_guided_filter.cpp
View file @
1c0cb8b5
...
@@ -46,7 +46,7 @@ using namespace testing;
...
@@ -46,7 +46,7 @@ using namespace testing;
using
namespace
cv
;
using
namespace
cv
;
using
namespace
cv
::
ximgproc
;
using
namespace
cv
::
ximgproc
;
CV_ENUM
(
GuideTypes
,
CV_8UC1
,
CV_8UC
2
,
CV_8UC3
,
CV_32FC1
,
CV_32FC2
,
CV_32FC3
);
CV_ENUM
(
GuideTypes
,
CV_8UC1
,
CV_8UC
3
,
CV_32FC1
,
CV_32FC3
);
CV_ENUM
(
SrcTypes
,
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
);
CV_ENUM
(
SrcTypes
,
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
);
typedef
tuple
<
GuideTypes
,
SrcTypes
,
Size
>
GFParams
;
typedef
tuple
<
GuideTypes
,
SrcTypes
,
Size
>
GFParams
;
...
@@ -75,7 +75,7 @@ PERF_TEST_P( GuidedFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::al
...
@@ -75,7 +75,7 @@ PERF_TEST_P( GuidedFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::al
guidedFilter
(
guide
,
src
,
dst
,
radius
,
eps
);
guidedFilter
(
guide
,
src
,
dst
,
radius
,
eps
);
}
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
}
}
modules/ximgproc/perf/pref_joint_bilateral_filter.cpp
View file @
1c0cb8b5
...
@@ -51,7 +51,7 @@ typedef TestBaseWithParam<JBFTestParam> JointBilateralFilterTest;
...
@@ -51,7 +51,7 @@ typedef TestBaseWithParam<JBFTestParam> JointBilateralFilterTest;
PERF_TEST_P
(
JointBilateralFilterTest
,
perf
,
PERF_TEST_P
(
JointBilateralFilterTest
,
perf
,
Combine
(
Combine
(
Values
(
2.0
,
4.0
,
6
.0
,
10.0
),
Values
(
4
.0
,
10.0
),
SZ_TYPICAL
,
SZ_TYPICAL
,
Values
(
CV_8U
,
CV_32F
),
Values
(
CV_8U
,
CV_32F
),
Values
(
1
,
3
),
Values
(
1
,
3
),
...
@@ -80,6 +80,6 @@ PERF_TEST_P(JointBilateralFilterTest, perf,
...
@@ -80,6 +80,6 @@ PERF_TEST_P(JointBilateralFilterTest, perf,
jointBilateralFilter
(
joint
,
src
,
dst
,
0
,
sigmaC
,
sigmaS
);
jointBilateralFilter
(
joint
,
src
,
dst
,
0
,
sigmaC
,
sigmaS
);
}
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
}
}
modules/ximgproc/test/test_adaptive_manifold.cpp
View file @
1c0cb8b5
...
@@ -69,7 +69,7 @@ TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
...
@@ -69,7 +69,7 @@ TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
cv
::
setNumThreads
(
cv
::
getNumberOfCPUs
());
cv
::
setNumThreads
(
cv
::
getNumberOfCPUs
());
for
(
int
i
=
0
;
i
<
10
;
i
++
)
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
{
Size
sz
(
rnd
.
uniform
(
512
,
1024
),
rnd
.
uniform
(
512
,
1024
));
Size
sz
(
rnd
.
uniform
(
512
,
1024
),
rnd
.
uniform
(
512
,
1024
));
...
@@ -188,7 +188,7 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
...
@@ -188,7 +188,7 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
resize
(
guide
,
guide
,
dstSize
);
resize
(
guide
,
guide
,
dstSize
);
resize
(
src
,
src
,
dstSize
);
resize
(
src
,
src
,
dstSize
);
for
(
int
iter
=
0
;
iter
<
6
;
iter
++
)
for
(
int
iter
=
0
;
iter
<
4
;
iter
++
)
{
{
double
sigma_s
=
rnd
.
uniform
(
1.0
,
50.0
);
double
sigma_s
=
rnd
.
uniform
(
1.0
,
50.0
);
double
sigma_r
=
rnd
.
uniform
(
0.1
,
0.9
);
double
sigma_r
=
rnd
.
uniform
(
0.1
,
0.9
);
...
@@ -212,8 +212,8 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
...
@@ -212,8 +212,8 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
AdaptiveManifoldRefImplTest
,
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
AdaptiveManifoldRefImplTest
,
Combine
(
Combine
(
Values
(
"cv/
shared/lena.png"
,
"cv/
edgefilter/kodim23.png"
,
"cv/npr/test4.png"
),
Values
(
"cv/edgefilter/kodim23.png"
,
"cv/npr/test4.png"
),
Values
(
"cv/
shared/lena.png"
,
"cv/
edgefilter/kodim23.png"
,
"cv/npr/test4.png"
)
Values
(
"cv/edgefilter/kodim23.png"
,
"cv/npr/test4.png"
)
));
));
}
}
modules/ximgproc/test/test_disparity_wls_filter.cpp
View file @
1c0cb8b5
modules/ximgproc/test/test_domain_transform.cpp
View file @
1c0cb8b5
...
@@ -51,7 +51,7 @@ static string getOpenCVExtraDir()
...
@@ -51,7 +51,7 @@ static string getOpenCVExtraDir()
return
cvtest
::
TS
::
ptr
()
->
get_data_path
();
return
cvtest
::
TS
::
ptr
()
->
get_data_path
();
}
}
CV_ENUM
(
SupportedTypes
,
CV_8UC1
,
CV_8UC
2
,
CV_8UC3
,
CV_8UC4
,
CV_32FC1
,
CV_32FC2
,
CV_32FC3
,
CV_32FC4
);
CV_ENUM
(
SupportedTypes
,
CV_8UC1
,
CV_8UC
3
,
CV_32FC1
);
// reduced set
CV_ENUM
(
ModeType
,
DTF_NC
,
DTF_IC
,
DTF_RF
)
CV_ENUM
(
ModeType
,
DTF_NC
,
DTF_IC
,
DTF_RF
)
typedef
tuple
<
Size
,
ModeType
,
SupportedTypes
,
SupportedTypes
>
DTParams
;
typedef
tuple
<
Size
,
ModeType
,
SupportedTypes
,
SupportedTypes
>
DTParams
;
...
...
modules/ximgproc/test/test_fast_hough_transform.cpp
View file @
1c0cb8b5
...
@@ -455,8 +455,8 @@ TEST_P(FastHoughTransformTest, accuracy)
...
@@ -455,8 +455,8 @@ TEST_P(FastHoughTransformTest, accuracy)
testFht
.
run_n_tests
(
depth
,
channels
,
pts_count
,
n_per_test
);
testFht
.
run_n_tests
(
depth
,
channels
,
pts_count
,
n_per_test
);
}
}
#define FHT_ALL_DEPTHS CV_8U, CV_
8S, CV_16U, CV_16S
, CV_32S, CV_32F, CV_64F
#define FHT_ALL_DEPTHS CV_8U, CV_
16U
, CV_32S, CV_32F, CV_64F
#define FHT_ALL_CHANNELS 1,
2,
3, 4
#define FHT_ALL_CHANNELS 1, 3, 4
INSTANTIATE_TEST_CASE_P
(
FullSet
,
FastHoughTransformTest
,
INSTANTIATE_TEST_CASE_P
(
FullSet
,
FastHoughTransformTest
,
Combine
(
Values
(
FHT_ALL_DEPTHS
),
Combine
(
Values
(
FHT_ALL_DEPTHS
),
...
...
modules/ximgproc/test/test_fgs_filter.cpp
View file @
1c0cb8b5
...
@@ -51,7 +51,7 @@ static string getDataDir()
...
@@ -51,7 +51,7 @@ static string getDataDir()
return
cvtest
::
TS
::
ptr
()
->
get_data_path
();
return
cvtest
::
TS
::
ptr
()
->
get_data_path
();
}
}
CV_ENUM
(
SrcTypes
,
CV_8UC1
,
CV_8UC
2
,
CV_8UC3
,
CV_8UC4
,
CV_16SC1
,
CV_16SC2
,
CV_16SC3
,
CV_16SC4
,
CV_32FC1
,
CV_32FC2
,
CV_32FC3
,
CV_32FC4
);
CV_ENUM
(
SrcTypes
,
CV_8UC1
,
CV_8UC
3
,
CV_8UC4
,
CV_16SC1
,
CV_16SC3
,
CV_32FC1
);
CV_ENUM
(
GuideTypes
,
CV_8UC1
,
CV_8UC3
)
CV_ENUM
(
GuideTypes
,
CV_8UC1
,
CV_8UC3
)
typedef
tuple
<
Size
,
SrcTypes
,
GuideTypes
>
FGSParams
;
typedef
tuple
<
Size
,
SrcTypes
,
GuideTypes
>
FGSParams
;
typedef
TestWithParam
<
FGSParams
>
FastGlobalSmootherTest
;
typedef
TestWithParam
<
FGSParams
>
FastGlobalSmootherTest
;
...
@@ -60,7 +60,7 @@ TEST(FastGlobalSmootherTest, SplatSurfaceAccuracy)
...
@@ -60,7 +60,7 @@ TEST(FastGlobalSmootherTest, SplatSurfaceAccuracy)
{
{
RNG
rnd
(
0
);
RNG
rnd
(
0
);
for
(
int
i
=
0
;
i
<
10
;
i
++
)
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
{
Size
sz
(
rnd
.
uniform
(
512
,
1024
),
rnd
.
uniform
(
512
,
1024
));
Size
sz
(
rnd
.
uniform
(
512
,
1024
),
rnd
.
uniform
(
512
,
1024
));
...
...
modules/ximgproc/test/test_guided_filter.cpp
View file @
1c0cb8b5
...
@@ -339,18 +339,18 @@ void GuidedFilterRefImpl::applyTransform(int cNum, Mat *Ichannels, Mat *beta, Ma
...
@@ -339,18 +339,18 @@ void GuidedFilterRefImpl::applyTransform(int cNum, Mat *Ichannels, Mat *beta, Ma
}
}
}
}
typedef
tuple
<
int
,
int
,
string
,
string
>
GFParams
;
typedef
tuple
<
int
,
string
,
string
>
GFParams
;
typedef
TestWithParam
<
GFParams
>
GuidedFilterTest
;
typedef
TestWithParam
<
GFParams
>
GuidedFilterTest
;
TEST_P
(
GuidedFilterTest
,
accuracy
)
TEST_P
(
GuidedFilterTest
,
accuracy
)
{
{
GFParams
params
=
GetParam
();
GFParams
params
=
GetParam
();
int
guideCnNum
=
get
<
0
>
(
params
)
;
int
guideCnNum
=
3
;
int
srcCnNum
=
get
<
1
>
(
params
);
int
srcCnNum
=
get
<
0
>
(
params
);
string
guideFileName
=
get
<
2
>
(
params
);
string
guideFileName
=
get
<
1
>
(
params
);
string
srcFileName
=
get
<
3
>
(
params
);
string
srcFileName
=
get
<
2
>
(
params
);
int
seed
=
100
*
guideCnNum
+
50
*
srcCnNum
+
5
*
(
int
)
guideFileName
.
length
()
+
(
int
)
srcFileName
.
length
();
int
seed
=
100
*
guideCnNum
+
50
*
srcCnNum
+
5
*
(
int
)
guideFileName
.
length
()
+
(
int
)
srcFileName
.
length
();
RNG
rng
(
seed
);
RNG
rng
(
seed
);
...
@@ -364,7 +364,7 @@ TEST_P(GuidedFilterTest, accuracy)
...
@@ -364,7 +364,7 @@ TEST_P(GuidedFilterTest, accuracy)
guide
=
convertTypeAndSize
(
guide
,
CV_MAKE_TYPE
(
guide
.
depth
(),
guideCnNum
),
dstSize
);
guide
=
convertTypeAndSize
(
guide
,
CV_MAKE_TYPE
(
guide
.
depth
(),
guideCnNum
),
dstSize
);
src
=
convertTypeAndSize
(
src
,
CV_MAKE_TYPE
(
src
.
depth
(),
srcCnNum
),
dstSize
);
src
=
convertTypeAndSize
(
src
,
CV_MAKE_TYPE
(
src
.
depth
(),
srcCnNum
),
dstSize
);
for
(
int
iter
=
0
;
iter
<
3
;
iter
++
)
for
(
int
iter
=
0
;
iter
<
2
;
iter
++
)
{
{
int
radius
=
rng
.
uniform
(
0
,
50
);
int
radius
=
rng
.
uniform
(
0
,
50
);
double
eps
=
rng
.
uniform
(
0.0
,
SQR
(
255.0
));
double
eps
=
rng
.
uniform
(
0.0
,
SQR
(
255.0
));
...
@@ -389,10 +389,9 @@ TEST_P(GuidedFilterTest, accuracy)
...
@@ -389,10 +389,9 @@ TEST_P(GuidedFilterTest, accuracy)
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
GuidedFilterTest
,
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
GuidedFilterTest
,
Combine
(
Combine
(
Values
(
1
,
2
,
3
),
Values
(
1
,
3
),
Values
(
1
,
2
,
3
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
,
"cv/npr/test2.png"
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
)
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
,
"cv/npr/test2.png"
)
));
));
}
}
modules/ximgproc/test/test_joint_bilateral_filter.cpp
View file @
1c0cb8b5
...
@@ -204,18 +204,18 @@ void jointBilateralFilterNaive(InputArray joint, InputArray src, OutputArray dst
...
@@ -204,18 +204,18 @@ void jointBilateralFilterNaive(InputArray joint, InputArray src, OutputArray dst
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
typedef
tuple
<
double
,
string
,
string
,
int
,
int
,
int
>
JBFTestParam
;
typedef
tuple
<
string
,
string
>
JBFTestParam
;
typedef
TestWithParam
<
JBFTestParam
>
JointBilateralFilterTest_NaiveRef
;
typedef
TestWithParam
<
JBFTestParam
>
JointBilateralFilterTest_NaiveRef
;
TEST_P
(
JointBilateralFilterTest_NaiveRef
,
Accuracy
)
TEST_P
(
JointBilateralFilterTest_NaiveRef
,
Accuracy
)
{
{
JBFTestParam
param
=
GetParam
();
JBFTestParam
param
=
GetParam
();
double
sigmaS
=
get
<
0
>
(
param
)
;
double
sigmaS
=
8.0
;
string
jointPath
=
get
<
1
>
(
param
);
string
jointPath
=
get
<
0
>
(
param
);
string
srcPath
=
get
<
2
>
(
param
);
string
srcPath
=
get
<
1
>
(
param
);
int
depth
=
get
<
3
>
(
param
)
;
int
depth
=
CV_8U
;
int
jCn
=
get
<
4
>
(
param
)
;
int
jCn
=
3
;
int
srcCn
=
get
<
5
>
(
param
)
;
int
srcCn
=
1
;
int
jointType
=
CV_MAKE_TYPE
(
depth
,
jCn
);
int
jointType
=
CV_MAKE_TYPE
(
depth
,
jCn
);
int
srcType
=
CV_MAKE_TYPE
(
depth
,
srcCn
);
int
srcType
=
CV_MAKE_TYPE
(
depth
,
srcCn
);
...
@@ -242,26 +242,22 @@ TEST_P(JointBilateralFilterTest_NaiveRef, Accuracy)
...
@@ -242,26 +242,22 @@ TEST_P(JointBilateralFilterTest_NaiveRef, Accuracy)
INSTANTIATE_TEST_CASE_P
(
Set2
,
JointBilateralFilterTest_NaiveRef
,
INSTANTIATE_TEST_CASE_P
(
Set2
,
JointBilateralFilterTest_NaiveRef
,
Combine
(
Combine
(
Values
(
4.0
,
6.0
,
8.0
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/fruits.png"
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/fruits.png"
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/lena.png"
,
"/cv/shared/fruits.png"
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/fruits.png"
))
Values
(
CV_8U
,
CV_32F
),
Values
(
1
,
3
),
Values
(
1
,
3
))
);
);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
typedef
tuple
<
double
,
string
,
int
>
BFTestParam
;
typedef
tuple
<
string
,
int
>
BFTestParam
;
typedef
TestWithParam
<
BFTestParam
>
JointBilateralFilterTest_BilateralRef
;
typedef
TestWithParam
<
BFTestParam
>
JointBilateralFilterTest_BilateralRef
;
TEST_P
(
JointBilateralFilterTest_BilateralRef
,
Accuracy
)
TEST_P
(
JointBilateralFilterTest_BilateralRef
,
Accuracy
)
{
{
BFTestParam
param
=
GetParam
();
BFTestParam
param
=
GetParam
();
double
sigmaS
=
get
<
0
>
(
param
)
;
double
sigmaS
=
4.0
;
string
srcPath
=
get
<
1
>
(
param
);
string
srcPath
=
get
<
0
>
(
param
);
int
srcType
=
get
<
2
>
(
param
);
int
srcType
=
get
<
1
>
(
param
);
Mat
src
=
imread
(
getOpenCVExtraDir
()
+
srcPath
);
Mat
src
=
imread
(
getOpenCVExtraDir
()
+
srcPath
);
ASSERT_TRUE
(
!
src
.
empty
());
ASSERT_TRUE
(
!
src
.
empty
());
...
@@ -283,9 +279,8 @@ TEST_P(JointBilateralFilterTest_BilateralRef, Accuracy)
...
@@ -283,9 +279,8 @@ TEST_P(JointBilateralFilterTest_BilateralRef, Accuracy)
INSTANTIATE_TEST_CASE_P
(
Set1
,
JointBilateralFilterTest_BilateralRef
,
INSTANTIATE_TEST_CASE_P
(
Set1
,
JointBilateralFilterTest_BilateralRef
,
Combine
(
Combine
(
Values
(
4.0
,
6.0
,
8.0
),
Values
(
"/cv/shared/lena.png"
,
"cv/shared/box_in_scene.png"
),
Values
(
"/cv/shared/pic2.png"
,
"/cv/shared/lena.png"
,
"cv/shared/box_in_scene.png"
),
Values
(
CV_8UC3
,
CV_32FC1
)
Values
(
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
)
)
)
);
);
...
...
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