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
3e708e01
Commit
3e708e01
authored
Jan 24, 2017
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solvePnP: use CV_32F for rvec, tvec if all PnP inputs are CV_32F
parent
205ccddf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+8
-2
No files found.
modules/calib3d/src/solvepnp.cpp
View file @
3e708e01
...
...
@@ -77,8 +77,14 @@ bool solvePnP( InputArray _opoints, InputArray _ipoints,
}
else
{
_rvec
.
create
(
3
,
1
,
CV_64F
);
_tvec
.
create
(
3
,
1
,
CV_64F
);
int
mtype
=
CV_64F
;
// use CV_32F if all PnP inputs are CV_32F and outputs are empty
if
(
_ipoints
.
depth
()
==
_cameraMatrix
.
depth
()
&&
_ipoints
.
depth
()
==
_opoints
.
depth
()
&&
_rvec
.
empty
()
&&
_tvec
.
empty
())
mtype
=
_opoints
.
depth
();
_rvec
.
create
(
3
,
1
,
mtype
);
_tvec
.
create
(
3
,
1
,
mtype
);
}
rvec
=
_rvec
.
getMat
();
tvec
=
_tvec
.
getMat
();
...
...
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