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
8a79d414
Commit
8a79d414
authored
Apr 29, 2011
by
Alexander Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in solvePnPRansac test (thanks to Pieter-Jan Busschaert)
test was refactored
parent
34a18f79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+1
-1
test_solvepnp_ransac.cpp
modules/calib3d/test/test_solvepnp_ransac.cpp
+15
-7
No files found.
modules/calib3d/src/solvepnp.cpp
View file @
8a79d414
...
...
@@ -73,7 +73,7 @@ namespace cv
Mat
R
(
3
,
3
,
CV_64FC1
);
Rodrigues
(
rvec
,
R
);
Mat
transformation
(
3
,
4
,
CV_64F
);
Mat
r
=
transformation
.
colRange
(
0
,
2
);
Mat
r
=
transformation
.
colRange
(
0
,
3
);
R
.
copyTo
(
r
);
Mat
t
=
transformation
.
colRange
(
3
,
4
);
tvec
.
copyTo
(
t
);
...
...
modules/calib3d/test/test_solvepnp_ransac.cpp
View file @
8a79d414
...
...
@@ -97,7 +97,11 @@ protected:
}
}
double
eps
=
1.0e-7
;
for
(
int
testIndex
=
0
;
testIndex
<
10
;
testIndex
++
)
int
successfulTestsCount
=
0
;
int
totalTestsCount
=
10
;
for
(
int
testIndex
=
0
;
testIndex
<
totalTestsCount
;
testIndex
++
)
{
try
{
...
...
@@ -118,12 +122,9 @@ protected:
isTestSuccess
=
isTestSuccess
&&
(
abs
(
tvec
.
at
<
double
>
(
1
,
0
)
-
1
)
<
eps
);
isTestSuccess
=
isTestSuccess
&&
(
abs
(
tvec
.
at
<
double
>
(
2
,
0
))
<
eps
);
if
(
!
isTestSuccess
)
{
ts
.
printf
(
cvtest
::
TS
::
LOG
,
"Invalid accuracy, inliers.size = %d
\n
"
,
inliers
.
size
());
ts
.
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
break
;
}
if
(
isTestSuccess
)
successfulTestsCount
++
;
}
catch
(...)
...
...
@@ -132,6 +133,13 @@ protected:
ts
.
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
}
}
if
(
successfulTestsCount
<
0.8
*
totalTestsCount
)
{
ts
.
printf
(
cvtest
::
TS
::
LOG
,
"Invalid accuracy, failed %d tests from %d
\n
"
,
totalTestsCount
-
successfulTestsCount
,
totalTestsCount
);
ts
.
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
}
}
};
...
...
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