Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
5a998335
Commit
5a998335
authored
9 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5943 from alalek:regression_5908
parents
70cb17bf
49d3e39b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
6 deletions
+62
-6
test_convhull.cpp
modules/imgproc/test/test_convhull.cpp
+57
-0
ts.hpp
modules/ts/include/opencv2/ts.hpp
+4
-1
cuda_test.hpp
modules/ts/include/opencv2/ts/cuda_test.hpp
+0
-3
ocl_test.hpp
modules/ts/include/opencv2/ts/ocl_test.hpp
+1
-2
No files found.
modules/imgproc/test/test_convhull.cpp
View file @
5a998335
...
...
@@ -1913,4 +1913,61 @@ TEST(Imgproc_ContourMoments, accuracy) { CV_ContourMomentsTest test; test.safe_r
TEST
(
Imgproc_ContourPerimeterSlice
,
accuracy
)
{
CV_PerimeterAreaSliceTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_FitEllipse
,
small
)
{
CV_FitEllipseSmallTest
test
;
test
.
safe_run
();
}
PARAM_TEST_CASE
(
ConvexityDefects_regression_5908
,
bool
,
int
)
{
public
:
int
start_index
;
bool
clockwise
;
Mat
contour
;
virtual
void
SetUp
()
{
clockwise
=
GET_PARAM
(
0
);
start_index
=
GET_PARAM
(
1
);
const
int
N
=
11
;
const
Point2i
points
[
N
]
=
{
Point2i
(
154
,
408
),
Point2i
(
45
,
223
),
Point2i
(
115
,
275
),
// inner
Point2i
(
104
,
166
),
Point2i
(
154
,
256
),
// inner
Point2i
(
169
,
144
),
Point2i
(
185
,
256
),
// inner
Point2i
(
235
,
170
),
Point2i
(
240
,
320
),
// inner
Point2i
(
330
,
287
),
Point2i
(
224
,
390
)
};
contour
=
Mat
(
N
,
1
,
CV_32SC2
);
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
contour
.
at
<
Point2i
>
(
i
)
=
(
!
clockwise
)
// image and convexHull coordinate systems are different
?
points
[(
start_index
+
i
)
%
N
]
:
points
[
N
-
1
-
((
start_index
+
i
)
%
N
)];
}
}
};
TEST_P
(
ConvexityDefects_regression_5908
,
simple
)
{
std
::
vector
<
int
>
hull
;
cv
::
convexHull
(
contour
,
hull
,
clockwise
,
false
);
std
::
vector
<
Vec4i
>
result
;
cv
::
convexityDefects
(
contour
,
hull
,
result
);
EXPECT_EQ
(
4
,
(
int
)
result
.
size
());
}
INSTANTIATE_TEST_CASE_P
(
Imgproc
,
ConvexityDefects_regression_5908
,
testing
::
Combine
(
testing
::
Bool
(),
testing
::
Values
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
)
));
/* End of file. */
This diff is collapsed.
Click to expand it.
modules/ts/include/opencv2/ts.hpp
View file @
5a998335
...
...
@@ -35,6 +35,9 @@
# define GTEST_USES_POSIX_RE 0
#endif
#define PARAM_TEST_CASE(name, ...) struct name : testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
...
...
@@ -161,7 +164,7 @@ CV_EXPORTS void compare(const Mat& src1, const Mat& src2, Mat& dst, int cmpop);
CV_EXPORTS
void
compare
(
const
Mat
&
src
,
double
s
,
Mat
&
dst
,
int
cmpop
);
CV_EXPORTS
void
gemm
(
const
Mat
&
src1
,
const
Mat
&
src2
,
double
alpha
,
const
Mat
&
src3
,
double
beta
,
Mat
&
dst
,
int
flags
);
CV_EXPORTS
void
transform
(
const
Mat
&
src
,
Mat
&
dst
,
const
Mat
&
transmat
,
const
Mat
&
shift
);
CV_EXPORTS
void
transform
(
const
Mat
&
src
,
Mat
&
dst
,
const
Mat
&
transmat
,
const
Mat
&
shift
);
CV_EXPORTS
double
crossCorr
(
const
Mat
&
src1
,
const
Mat
&
src2
);
CV_EXPORTS
void
threshold
(
const
Mat
&
src
,
Mat
&
dst
,
double
thresh
,
double
maxval
,
int
thresh_type
);
CV_EXPORTS
void
minMaxIdx
(
InputArray
_img
,
double
*
minVal
,
double
*
maxVal
,
...
...
This diff is collapsed.
Click to expand it.
modules/ts/include/opencv2/ts/cuda_test.hpp
View file @
5a998335
...
...
@@ -208,9 +208,6 @@ namespace cvtest
} \
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::UnsafeTestBody()
#define PARAM_TEST_CASE(name, ...) struct name : testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#define DIFFERENT_SIZES testing::Values(cv::Size(128, 128), cv::Size(113, 113))
// Depth
...
...
This diff is collapsed.
Click to expand it.
modules/ts/include/opencv2/ts/ocl_test.hpp
View file @
5a998335
...
...
@@ -324,10 +324,9 @@ struct CV_EXPORTS TSTestWithParam : public TestUtils, public ::testing::TestWith
};
#undef PARAM_TEST_CASE
#define PARAM_TEST_CASE(name, ...) struct name : public TSTestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#ifndef IMPLEMENT_PARAM_CLASS
#define IMPLEMENT_PARAM_CLASS(name, type) \
class name \
...
...
This diff is collapsed.
Click to expand it.
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