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
e944533f
Commit
e944533f
authored
May 25, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compile warnings; reenabled solvePnPRansac.concurrency test
parent
85149f86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
test_homography.cpp
modules/calib3d/test/test_homography.cpp
+1
-1
test_solvepnp_ransac.cpp
modules/calib3d/test/test_solvepnp_ransac.cpp
+8
-14
No files found.
modules/calib3d/test/test_homography.cpp
View file @
e944533f
...
...
@@ -669,7 +669,7 @@ TEST(Calib3d_Homography, fromImages)
//-- Localize the model
std
::
vector
<
Point2f
>
pointframe1
;
std
::
vector
<
Point2f
>
pointframe2
;
for
(
int
i
=
0
;
i
<
good_matches
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
good_matches
.
size
();
i
++
)
{
//-- Get the keypoints from the good matches
pointframe1
.
push_back
(
keypoints_1
[
good_matches
[
i
].
queryIdx
].
pt
);
...
...
modules/calib3d/test/test_solvepnp_ransac.cpp
View file @
e944533f
...
...
@@ -138,7 +138,7 @@ protected:
}
solvePnPRansac
(
points
,
projectedPoints
,
intrinsics
,
distCoeffs
,
rvec
,
tvec
,
false
,
500
,
0.5
,
0.99
,
inliers
,
method
);
false
,
500
,
0.5
f
,
0.99
,
inliers
,
method
);
bool
isTestSuccess
=
inliers
.
size
()
>=
points
.
size
()
*
0.95
;
...
...
@@ -254,10 +254,7 @@ protected:
TEST
(
Calib3d_SolvePnPRansac
,
accuracy
)
{
CV_solvePnPRansac_Test
test
;
test
.
safe_run
();
}
TEST
(
Calib3d_SolvePnP
,
accuracy
)
{
CV_solvePnP_Test
test
;
test
.
safe_run
();
}
#ifdef HAVE_TBB
TEST
(
DISABLED_Calib3d_SolvePnPRansac
,
concurrency
)
TEST
(
Calib3d_SolvePnPRansac
,
concurrency
)
{
int
count
=
7
*
13
;
...
...
@@ -287,12 +284,11 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
{
// limit concurrency to get deterministic result
cv
::
theRNG
().
state
=
20121010
;
tbb
::
task_scheduler_init
one_thread
(
1
);
theRNG
().
state
=
20121010
;
setNumThreads
(
1
);
solvePnPRansac
(
object
,
image
,
camera_mat
,
dist_coef
,
rvec1
,
tvec1
);
}
if
(
1
)
{
Mat
rvec
;
Mat
tvec
;
...
...
@@ -306,8 +302,8 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
{
// single thread again
cv
::
theRNG
().
state
=
20121010
;
tbb
::
task_scheduler_init
one_thread
(
1
);
theRNG
().
state
=
20121010
;
setNumThreads
(
1
);
solvePnPRansac
(
object
,
image
,
camera_mat
,
dist_coef
,
rvec2
,
tvec2
);
}
...
...
@@ -316,9 +312,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
EXPECT_LT
(
rnorm
,
1e-6
);
EXPECT_LT
(
tnorm
,
1e-6
);
}
#endif
TEST
(
Calib3d_SolvePnP
,
double_support
)
{
...
...
@@ -338,8 +332,8 @@ TEST(Calib3d_SolvePnP, double_support)
Mat
R
,
t
,
RF
,
tF
;
vector
<
int
>
inliers
;
solvePnPRansac
(
points3dF
,
points2dF
,
intrinsics
,
cv
::
Mat
(),
RF
,
tF
,
true
,
100
,
8
,
0.999
,
inliers
,
cv
::
SOLVEPNP_P3P
);
solvePnPRansac
(
points3d
,
points2d
,
intrinsics
,
cv
::
Mat
(),
R
,
t
,
true
,
100
,
8
,
0.999
,
inliers
,
cv
::
SOLVEPNP_P3P
);
solvePnPRansac
(
points3dF
,
points2dF
,
intrinsics
,
cv
::
Mat
(),
RF
,
tF
,
true
,
100
,
8
.
f
,
0.999
,
inliers
,
cv
::
SOLVEPNP_P3P
);
solvePnPRansac
(
points3d
,
points2d
,
intrinsics
,
cv
::
Mat
(),
R
,
t
,
true
,
100
,
8
.
f
,
0.999
,
inliers
,
cv
::
SOLVEPNP_P3P
);
ASSERT_LE
(
norm
(
R
,
Mat_
<
double
>
(
RF
),
NORM_INF
),
1e-3
);
ASSERT_LE
(
norm
(
t
,
Mat_
<
double
>
(
tF
),
NORM_INF
),
1e-3
);
...
...
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