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
bc081719
Commit
bc081719
authored
Apr 11, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2080 from paroj:aruco_axes
parents
f26c9836
0f030dd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
22 deletions
+6
-22
aruco.hpp
modules/aruco/include/opencv2/aruco.hpp
+2
-0
aruco.cpp
modules/aruco/src/aruco.cpp
+4
-22
No files found.
modules/aruco/include/opencv2/aruco.hpp
View file @
bc081719
...
...
@@ -471,6 +471,8 @@ CV_EXPORTS_W void drawDetectedMarkers(InputOutputArray image, InputArrayOfArrays
*
* Given the pose estimation of a marker or board, this function draws the axis of the world
* coordinate system, i.e. the system centered on the marker/board. Useful for debugging purposes.
*
* @deprecated use cv::drawFrameAxes
*/
CV_EXPORTS_W
void
drawAxis
(
InputOutputArray
image
,
InputArray
cameraMatrix
,
InputArray
distCoeffs
,
InputArray
rvec
,
InputArray
tvec
,
float
length
);
...
...
modules/aruco/src/aruco.cpp
View file @
bc081719
...
...
@@ -1731,30 +1731,12 @@ void drawDetectedMarkers(InputOutputArray _image, InputArrayOfArrays _corners,
/**
*/
void
drawAxis
(
InputOutputArray
_image
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
InputArray
_rvec
,
InputArray
_tvec
,
float
length
)
{
CV_Assert
(
_image
.
getMat
().
total
()
!=
0
&&
(
_image
.
getMat
().
channels
()
==
1
||
_image
.
getMat
().
channels
()
==
3
));
CV_Assert
(
length
>
0
);
// project axis points
vector
<
Point3f
>
axisPoints
;
axisPoints
.
push_back
(
Point3f
(
0
,
0
,
0
));
axisPoints
.
push_back
(
Point3f
(
length
,
0
,
0
));
axisPoints
.
push_back
(
Point3f
(
0
,
length
,
0
));
axisPoints
.
push_back
(
Point3f
(
0
,
0
,
length
));
vector
<
Point2f
>
imagePoints
;
projectPoints
(
axisPoints
,
_rvec
,
_tvec
,
_cameraMatrix
,
_distCoeffs
,
imagePoints
);
// draw axis lines
line
(
_image
,
imagePoints
[
0
],
imagePoints
[
1
],
Scalar
(
0
,
0
,
255
),
3
);
line
(
_image
,
imagePoints
[
0
],
imagePoints
[
2
],
Scalar
(
0
,
255
,
0
),
3
);
line
(
_image
,
imagePoints
[
0
],
imagePoints
[
3
],
Scalar
(
255
,
0
,
0
),
3
);
void
drawAxis
(
InputOutputArray
_image
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
InputArray
_rvec
,
InputArray
_tvec
,
float
length
)
{
drawFrameAxes
(
_image
,
_cameraMatrix
,
_distCoeffs
,
_rvec
,
_tvec
,
length
,
3
);
}
/**
*/
void
drawMarker
(
const
Ptr
<
Dictionary
>
&
dictionary
,
int
id
,
int
sidePixels
,
OutputArray
_img
,
int
borderBits
)
{
...
...
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