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
fd5431c3
Commit
fd5431c3
authored
Jun 21, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1230 from sovrasov:aruco_draw_fix
parents
c19a1dfa
dc332c78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
aruco.cpp
modules/aruco/src/aruco.cpp
+1
-0
test_misc.cpp
modules/aruco/test/test_misc.cpp
+24
-0
No files found.
modules/aruco/src/aruco.cpp
View file @
fd5431c3
...
...
@@ -1676,6 +1676,7 @@ void _drawPlanarBoardImpl(Board *_board, Size outSize, OutputArray _img, int mar
// get marker
Size
dst_sz
(
outCorners
[
2
]
-
outCorners
[
0
]);
// assuming CCW order
dst_sz
.
width
=
dst_sz
.
height
=
std
::
min
(
dst_sz
.
width
,
dst_sz
.
height
);
//marker should be square
dictionary
.
drawMarker
(
_board
->
ids
[
m
],
dst_sz
.
width
,
marker
,
borderBits
);
if
((
outCorners
[
0
].
y
==
outCorners
[
1
].
y
)
&&
(
outCorners
[
1
].
x
==
outCorners
[
2
].
x
))
{
...
...
modules/aruco/test/test_misc.cpp
0 → 100644
View file @
fd5431c3
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "test_precomp.hpp"
#include <opencv2/aruco/charuco.hpp>
TEST
(
CV_ArucoDrawMarker
,
regression_1226
)
{
int
squares_x
=
7
;
int
squares_y
=
5
;
int
bwidth
=
1600
;
int
bheight
=
1200
;
cv
::
Ptr
<
cv
::
aruco
::
Dictionary
>
dict
=
cv
::
aruco
::
getPredefinedDictionary
(
cv
::
aruco
::
DICT_4X4_50
);
cv
::
Ptr
<
cv
::
aruco
::
CharucoBoard
>
board
=
cv
::
aruco
::
CharucoBoard
::
create
(
squares_x
,
squares_y
,
1.0
,
0.75
,
dict
);
cv
::
Size
sz
(
bwidth
,
bheight
);
cv
::
Mat
mat
;
ASSERT_NO_THROW
(
{
board
->
draw
(
sz
,
mat
,
0
,
1
);
});
}
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