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
94e777ba
Commit
94e777ba
authored
Sep 04, 2015
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to fix some tests
parent
4f860dcf
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
138 additions
and
158 deletions
+138
-158
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
+11
-12
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
+10
-12
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
+2
-3
perf_guided_filter.cpp
modules/ximgproc/perf/perf_guided_filter.cpp
+12
-13
pref_joint_bilateral_filter.cpp
modules/ximgproc/perf/pref_joint_bilateral_filter.cpp
+12
-13
test_adaptive_manifold.cpp
modules/ximgproc/test/test_adaptive_manifold.cpp
+15
-15
test_disparity_wls_filter.cpp
modules/ximgproc/test/test_disparity_wls_filter.cpp
+1
-2
test_domain_transform.cpp
modules/ximgproc/test/test_domain_transform.cpp
+10
-11
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
+3
-4
test_guided_filter.cpp
modules/ximgproc/test/test_guided_filter.cpp
+18
-20
test_joint_bilateral_filter.cpp
modules/ximgproc/test/test_joint_bilateral_filter.cpp
+22
-28
No files found.
modules/line_descriptor/perf/perf_descriptors.cpp
View file @
94e777ba
...
...
@@ -72,6 +72,6 @@ PERF_TEST_P(file_str, descriptors, testing::Values(IMAGES))
bd
->
compute
(
frame
,
keylines
,
descriptors
);
}
SANITY_CHECK
(
descriptors
);
SANITY_CHECK
_NOTHING
(
);
}
modules/line_descriptor/perf/perf_detection.cpp
View file @
94e777ba
...
...
@@ -109,7 +109,7 @@ PERF_TEST_P(file_str, detect, testing::Values(IMAGES))
createMatFromVec
(
keylines
,
lines
);
}
SANITY_CHECK
(
lines
);
SANITY_CHECK
_NOTHING
(
);
}
...
...
@@ -133,6 +133,6 @@ PERF_TEST_P(file_str, detect_lsd, testing::Values(IMAGES))
createMatFromVec
(
keylines
,
lines
);
}
SANITY_CHECK
(
lines
);
SANITY_CHECK
_NOTHING
(
);
}
modules/line_descriptor/perf/perf_matching.cpp
View file @
94e777ba
...
...
@@ -138,7 +138,7 @@ PERF_TEST(matching, single_match)
TEST_CYCLE
()
bd
->
match
(
query
,
train
,
dm
);
SANITY_CHECK_
MATCHES
(
dm
);
SANITY_CHECK_
NOTHING
(
);
}
...
...
@@ -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
)
...
...
@@ -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 @
94e777ba
...
...
@@ -205,7 +205,7 @@ PERF_TEST_P(Size_MatType, Registration_Shift,
TEST_CYCLE
()
shift
=
perfShift
(
frame
);
SANITY_CHECK
(
shift
);
SANITY_CHECK
_NOTHING
(
);
}
PERF_TEST_P
(
Size_MatType
,
Registration_Euclidean
,
...
...
@@ -223,7 +223,7 @@ PERF_TEST_P(Size_MatType, Registration_Euclidean,
TEST_CYCLE
()
result
=
perfEuclidean
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
PERF_TEST_P
(
Size_MatType
,
Registration_Similarity
,
...
...
@@ -241,7 +241,7 @@ PERF_TEST_P(Size_MatType, Registration_Similarity,
TEST_CYCLE
()
result
=
perfSimilarity
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
PERF_TEST_P
(
Size_MatType
,
Registration_Affine
,
...
...
@@ -259,7 +259,7 @@ PERF_TEST_P(Size_MatType, Registration_Affine,
TEST_CYCLE
()
result
=
perfAffine
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
PERF_TEST_P
(
Size_MatType
,
Registration_Projective
,
...
...
@@ -277,5 +277,5 @@ PERF_TEST_P(Size_MatType, Registration_Projective,
TEST_CYCLE
()
result
=
perfProjective
(
frame
);
SANITY_CHECK
(
result
);
SANITY_CHECK
_NOTHING
(
);
}
modules/xfeatures2d/perf/perf_daisy.cpp
View file @
94e777ba
...
...
@@ -29,5 +29,5 @@ PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
// compute all daisies in image
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
modules/xfeatures2d/perf/perf_latch.cpp
View file @
94e777ba
...
...
@@ -30,5 +30,5 @@ PERF_TEST_P(latch, extract, testing::Values(LATCH_IMAGES))
vector
<
uchar
>
descriptors
;
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
modules/xfeatures2d/perf/perf_surf.cpp
View file @
94e777ba
...
...
@@ -26,7 +26,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
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
))
...
...
@@ -45,7 +45,7 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK
_NOTHING
(
);
}
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
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
SANITY_CHECK
(
descriptors
,
1e-4
);
SANITY_CHECK_NOTHING
();
}
modules/xfeatures2d/perf/perf_surf.ocl.cpp
View file @
94e777ba
...
...
@@ -81,8 +81,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_with_data_transfer, testing::Values(SURF_IMAGES))
d_descriptors
.
download
(
cpu_dp
);
}
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK
(
cpu_dp
,
1
);
SANITY_CHECK_NOTHING
();
}
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
Mat
cpu_dp
;
d_keypoints
.
download
(
cpu_kp
);
d_descriptors
.
download
(
cpu_dp
);
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK
(
cpu_dp
,
1
);
SANITY_CHECK_NOTHING
();
}
#endif // HAVE_OPENCV_OCL
modules/ximgproc/perf/perf_adaptive_manifold.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -49,7 +49,7 @@ using namespace cv::ximgproc;
typedef
tuple
<
bool
,
Size
,
int
,
int
,
MatType
>
AMPerfTestParam
;
typedef
TestBaseWithParam
<
AMPerfTestParam
>
AdaptiveManifoldPerfTest
;
PERF_TEST_P
(
AdaptiveManifoldPerfTest
,
perf
,
Combine
(
Values
(
true
,
false
),
//adjust_outliers flag
...
...
@@ -70,7 +70,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
Mat
joint
(
sz
,
CV_MAKE_TYPE
(
depth
,
jointCnNum
));
Mat
src
(
sz
,
CV_MAKE_TYPE
(
depth
,
srcCnNum
));
Mat
dst
(
sz
,
CV_MAKE_TYPE
(
depth
,
srcCnNum
));
cv
::
setNumThreads
(
cv
::
getNumberOfCPUs
());
declare
.
in
(
joint
,
src
,
WARMUP_RNG
).
out
(
dst
).
tbb_threads
(
cv
::
getNumberOfCPUs
());
...
...
@@ -87,7 +87,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
sigma_r
/=
1.38
;
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
\ No newline at end of file
}
modules/ximgproc/perf/perf_disparity_wls_filter.cpp
View file @
94e777ba
...
...
@@ -89,7 +89,7 @@ PERF_TEST_P( DisparityWLSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTyp
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
)
...
...
modules/ximgproc/perf/perf_domain_transform.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -47,7 +47,7 @@ using namespace cv;
using
namespace
cv
::
ximgproc
;
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
)
typedef
tuple
<
GuideMatType
,
SourceMatType
,
Size
,
double
,
double
,
DTFMode
>
DTTestParams
;
...
...
@@ -82,8 +82,7 @@ PERF_TEST_P( DomainTransformTest, perf,
{
dtFilter
(
guide
,
src
,
dst
,
sigmaSpatial
,
sigmaColor
,
dtfType
);
}
SANITY_CHECK
(
dst
);
SANITY_CHECK_NOTHING
();
}
}
\ No newline at end of file
}
modules/ximgproc/perf/perf_fast_hough_transform.cpp
View file @
94e777ba
...
...
@@ -58,7 +58,7 @@ typedef std::tr1::tuple<Size, MatType, MatDepth> srcSize_srcType_dstDepth_t;
typedef
perf
::
TestBaseWithParam
<
srcSize_srcType_dstDepth_t
>
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
,
testing
::
Combine
(
...
...
modules/ximgproc/perf/perf_fgs_filter.cpp
View file @
94e777ba
...
...
@@ -75,7 +75,7 @@ PERF_TEST_P( FGSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::all()
fastGlobalSmootherFilter
(
guide
,
src
,
dst
,
lambda
,
sigma
);
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
\ No newline at end of file
}
modules/ximgproc/perf/perf_guided_filter.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -46,12 +46,12 @@ using namespace testing;
using
namespace
cv
;
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
);
typedef
tuple
<
GuideTypes
,
SrcTypes
,
Size
>
GFParams
;
typedef
TestBaseWithParam
<
GFParams
>
GuidedFilterPerfTest
;
PERF_TEST_P
(
GuidedFilterPerfTest
,
perf
,
Combine
(
GuideTypes
::
all
(),
SrcTypes
::
all
(),
Values
(
sz1080p
,
sz2K
))
)
{
RNG
rng
(
0
);
...
...
@@ -75,7 +75,7 @@ PERF_TEST_P( GuidedFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTypes::al
guidedFilter
(
guide
,
src
,
dst
,
radius
,
eps
);
}
SANITY_CHECK
(
dst
);
SANITY_CHECK
_NOTHING
(
);
}
}
\ No newline at end of file
}
modules/ximgproc/perf/pref_joint_bilateral_filter.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -49,9 +49,9 @@ using namespace cv::ximgproc;
typedef
tuple
<
double
,
Size
,
MatType
,
int
,
int
>
JBFTestParam
;
typedef
TestBaseWithParam
<
JBFTestParam
>
JointBilateralFilterTest
;
PERF_TEST_P
(
JointBilateralFilterTest
,
perf
,
PERF_TEST_P
(
JointBilateralFilterTest
,
perf
,
Combine
(
Values
(
2.0
,
4.0
,
6
.0
,
10.0
),
Values
(
4
.0
,
10.0
),
SZ_TYPICAL
,
Values
(
CV_8U
,
CV_32F
),
Values
(
1
,
3
),
...
...
@@ -79,7 +79,7 @@ PERF_TEST_P(JointBilateralFilterTest, perf,
{
jointBilateralFilter
(
joint
,
src
,
dst
,
0
,
sigmaC
,
sigmaS
);
}
SANITY_CHECK
(
dst
);
SANITY_CHECK_NOTHING
();
}
}
}
\ No newline at end of file
modules/ximgproc/test/test_adaptive_manifold.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -69,7 +69,7 @@ TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
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
));
...
...
@@ -96,7 +96,7 @@ TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
TEST
(
AdaptiveManifoldTest
,
AuthorsReferenceAccuracy
)
{
String
srcImgPath
=
"cv/edgefilter/kodim23.png"
;
String
refPaths
[]
=
{
"cv/edgefilter/amf/kodim23_amf_ss5_sr0.3_ref.png"
,
...
...
@@ -104,14 +104,14 @@ TEST(AdaptiveManifoldTest, AuthorsReferenceAccuracy)
"cv/edgefilter/amf/kodim23_amf_ss50_sr0.3_ref.png"
};
pair
<
double
,
double
>
refParams
[]
=
pair
<
double
,
double
>
refParams
[]
=
{
make_pair
(
5.0
,
0.3
),
make_pair
(
30.0
,
0.1
),
make_pair
(
50.0
,
0.3
)
};
String
refOutliersPaths
[]
=
String
refOutliersPaths
[]
=
{
"cv/edgefilter/amf/kodim23_amf_ss5_sr0.1_outliers_ref.png"
,
"cv/edgefilter/amf/kodim23_amf_ss15_sr0.3_outliers_ref.png"
,
...
...
@@ -188,7 +188,7 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
resize
(
guide
,
guide
,
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_r
=
rnd
.
uniform
(
0.1
,
0.9
);
...
...
@@ -210,10 +210,10 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
}
}
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
AdaptiveManifoldRefImplTest
,
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
AdaptiveManifoldRefImplTest
,
Combine
(
Values
(
"cv/
shared/lena.png"
,
"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"
),
Values
(
"cv/edgefilter/kodim23.png"
,
"cv/npr/test4.png"
)
));
}
modules/ximgproc/test/test_disparity_wls_filter.cpp
View file @
94e777ba
...
...
@@ -151,4 +151,4 @@ TEST_P(DisparityWLSFilterTest, MultiThreadReproducibility)
}
}
INSTANTIATE_TEST_CASE_P
(
FullSet
,
DisparityWLSFilterTest
,
Combine
(
Values
(
szODD
,
szQVGA
),
SrcTypes
::
all
(),
GuideTypes
::
all
(),
Values
(
true
,
false
),
Values
(
true
,
false
)));
}
\ No newline at end of file
}
modules/ximgproc/test/test_domain_transform.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -51,7 +51,7 @@ static string getOpenCVExtraDir()
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
)
typedef
tuple
<
Size
,
ModeType
,
SupportedTypes
,
SupportedTypes
>
DTParams
;
...
...
@@ -242,7 +242,7 @@ TEST(DomainTransformTest, AuthorReferenceAccuracy)
dtFilter
(
src
,
src
,
res_RF
,
ss
,
sc
,
DTF_RF
);
double
totalMaxError
=
1.0
/
64.0
*
src
.
total
();
EXPECT_LE
(
cvtest
::
norm
(
res_NC
,
ref_NC
,
NORM_L2
),
totalMaxError
);
EXPECT_LE
(
cvtest
::
norm
(
res_NC
,
ref_NC
,
NORM_INF
),
1
);
...
...
@@ -253,4 +253,4 @@ TEST(DomainTransformTest, AuthorReferenceAccuracy)
EXPECT_LE
(
cvtest
::
norm
(
res_IC
,
ref_IC
,
NORM_INF
),
1
);
}
}
\ No newline at end of file
}
modules/ximgproc/test/test_fast_hough_transform.cpp
View file @
94e777ba
...
...
@@ -455,8 +455,8 @@ TEST_P(FastHoughTransformTest, accuracy)
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_CHANNELS 1,
2,
3, 4
#define FHT_ALL_DEPTHS CV_8U, CV_
16U
, CV_32S, CV_32F, CV_64F
#define FHT_ALL_CHANNELS 1, 3, 4
INSTANTIATE_TEST_CASE_P
(
FullSet
,
FastHoughTransformTest
,
Combine
(
Values
(
FHT_ALL_DEPTHS
),
...
...
modules/ximgproc/test/test_fgs_filter.cpp
View file @
94e777ba
...
...
@@ -51,7 +51,7 @@ static string getDataDir()
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
)
typedef
tuple
<
Size
,
SrcTypes
,
GuideTypes
>
FGSParams
;
typedef
TestWithParam
<
FGSParams
>
FastGlobalSmootherTest
;
...
...
@@ -60,7 +60,7 @@ TEST(FastGlobalSmootherTest, SplatSurfaceAccuracy)
{
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
));
...
...
@@ -150,4 +150,4 @@ TEST_P(FastGlobalSmootherTest, MultiThreadReproducibility)
}
INSTANTIATE_TEST_CASE_P
(
FullSet
,
FastGlobalSmootherTest
,
Combine
(
Values
(
szODD
,
szQVGA
),
SrcTypes
::
all
(),
GuideTypes
::
all
()));
}
\ No newline at end of file
}
modules/ximgproc/test/test_guided_filter.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -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
;
TEST_P
(
GuidedFilterTest
,
accuracy
)
{
GFParams
params
=
GetParam
();
int
guideCnNum
=
get
<
0
>
(
params
)
;
int
srcCnNum
=
get
<
1
>
(
params
);
int
guideCnNum
=
3
;
int
srcCnNum
=
get
<
0
>
(
params
);
string
guideFileName
=
get
<
2
>
(
params
);
string
srcFileName
=
get
<
3
>
(
params
);
string
guideFileName
=
get
<
1
>
(
params
);
string
srcFileName
=
get
<
2
>
(
params
);
int
seed
=
100
*
guideCnNum
+
50
*
srcCnNum
+
5
*
(
int
)
guideFileName
.
length
()
+
(
int
)
srcFileName
.
length
();
RNG
rng
(
seed
);
...
...
@@ -364,7 +364,7 @@ TEST_P(GuidedFilterTest, accuracy)
guide
=
convertTypeAndSize
(
guide
,
CV_MAKE_TYPE
(
guide
.
depth
(),
guideCnNum
),
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
);
double
eps
=
rng
.
uniform
(
0.0
,
SQR
(
255.0
));
...
...
@@ -387,12 +387,11 @@ TEST_P(GuidedFilterTest, accuracy)
}
}
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
GuidedFilterTest
,
INSTANTIATE_TEST_CASE_P
(
TypicalSet
,
GuidedFilterTest
,
Combine
(
Values
(
1
,
2
,
3
),
Values
(
1
,
2
,
3
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
,
"cv/npr/test2.png"
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
,
"cv/npr/test2.png"
)
Values
(
1
,
3
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
),
Values
(
"cv/shared/lena.png"
,
"cv/shared/baboon.png"
)
));
}
\ No newline at end of file
}
modules/ximgproc/test/test_joint_bilateral_filter.cpp
View file @
94e777ba
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -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
;
TEST_P
(
JointBilateralFilterTest_NaiveRef
,
Accuracy
)
{
JBFTestParam
param
=
GetParam
();
double
sigmaS
=
get
<
0
>
(
param
)
;
string
jointPath
=
get
<
1
>
(
param
);
string
srcPath
=
get
<
2
>
(
param
);
int
depth
=
get
<
3
>
(
param
)
;
int
jCn
=
get
<
4
>
(
param
)
;
int
srcCn
=
get
<
5
>
(
param
)
;
double
sigmaS
=
8.0
;
string
jointPath
=
get
<
0
>
(
param
);
string
srcPath
=
get
<
1
>
(
param
);
int
depth
=
CV_8U
;
int
jCn
=
3
;
int
srcCn
=
1
;
int
jointType
=
CV_MAKE_TYPE
(
depth
,
jCn
);
int
srcType
=
CV_MAKE_TYPE
(
depth
,
srcCn
);
...
...
@@ -242,26 +242,22 @@ TEST_P(JointBilateralFilterTest_NaiveRef, Accuracy)
INSTANTIATE_TEST_CASE_P
(
Set2
,
JointBilateralFilterTest_NaiveRef
,
Combine
(
Values
(
4.0
,
6.0
,
8.0
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/fruits.png"
),
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/lena.png"
,
"/cv/shared/fruits.png"
),
Values
(
CV_8U
,
CV_32F
),
Values
(
1
,
3
),
Values
(
1
,
3
))
Values
(
"/cv/shared/airplane.png"
,
"/cv/shared/fruits.png"
))
);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
typedef
tuple
<
double
,
string
,
int
>
BFTestParam
;
typedef
tuple
<
string
,
int
>
BFTestParam
;
typedef
TestWithParam
<
BFTestParam
>
JointBilateralFilterTest_BilateralRef
;
TEST_P
(
JointBilateralFilterTest_BilateralRef
,
Accuracy
)
{
BFTestParam
param
=
GetParam
();
double
sigmaS
=
get
<
0
>
(
param
)
;
string
srcPath
=
get
<
1
>
(
param
);
int
srcType
=
get
<
2
>
(
param
);
double
sigmaS
=
4.0
;
string
srcPath
=
get
<
0
>
(
param
);
int
srcType
=
get
<
1
>
(
param
);
Mat
src
=
imread
(
getOpenCVExtraDir
()
+
srcPath
);
ASSERT_TRUE
(
!
src
.
empty
());
...
...
@@ -283,10 +279,9 @@ TEST_P(JointBilateralFilterTest_BilateralRef, Accuracy)
INSTANTIATE_TEST_CASE_P
(
Set1
,
JointBilateralFilterTest_BilateralRef
,
Combine
(
Values
(
4.0
,
6.0
,
8.0
),
Values
(
"/cv/shared/pic2.png"
,
"/cv/shared/lena.png"
,
"cv/shared/box_in_scene.png"
),
Values
(
CV_8UC1
,
CV_8UC3
,
CV_32FC1
,
CV_32FC3
)
Values
(
"/cv/shared/lena.png"
,
"cv/shared/box_in_scene.png"
),
Values
(
CV_8UC3
,
CV_32FC1
)
)
);
}
\ No newline at end of file
}
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