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
2075fa9c
Commit
2075fa9c
authored
Nov 20, 2018
by
Dan Mašek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve #13219: Make randomly generated colours opaque.
parent
36432cf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
draw.cpp
modules/features2d/src/draw.cpp
+2
-2
No files found.
modules/features2d/src/draw.cpp
View file @
2075fa9c
...
@@ -117,7 +117,7 @@ void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, In
...
@@ -117,7 +117,7 @@ void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, In
end
=
keypoints
.
end
();
end
=
keypoints
.
end
();
for
(
;
it
!=
end
;
++
it
)
for
(
;
it
!=
end
;
++
it
)
{
{
Scalar
color
=
isRandColor
?
Scalar
(
rng
(
256
),
rng
(
256
),
rng
(
256
)
)
:
_color
;
Scalar
color
=
isRandColor
?
Scalar
(
rng
(
256
),
rng
(
256
),
rng
(
256
),
255
)
:
_color
;
_drawKeypoint
(
outImage
,
*
it
,
color
,
flags
);
_drawKeypoint
(
outImage
,
*
it
,
color
,
flags
);
}
}
}
}
...
@@ -173,7 +173,7 @@ static inline void _drawMatch( InputOutputArray outImg, InputOutputArray outImg1
...
@@ -173,7 +173,7 @@ static inline void _drawMatch( InputOutputArray outImg, InputOutputArray outImg1
{
{
RNG
&
rng
=
theRNG
();
RNG
&
rng
=
theRNG
();
bool
isRandMatchColor
=
matchColor
==
Scalar
::
all
(
-
1
);
bool
isRandMatchColor
=
matchColor
==
Scalar
::
all
(
-
1
);
Scalar
color
=
isRandMatchColor
?
Scalar
(
rng
(
256
),
rng
(
256
),
rng
(
256
)
)
:
matchColor
;
Scalar
color
=
isRandMatchColor
?
Scalar
(
rng
(
256
),
rng
(
256
),
rng
(
256
)
,
255
)
:
matchColor
;
_drawKeypoint
(
outImg1
,
kp1
,
color
,
flags
);
_drawKeypoint
(
outImg1
,
kp1
,
color
,
flags
);
_drawKeypoint
(
outImg2
,
kp2
,
color
,
flags
);
_drawKeypoint
(
outImg2
,
kp2
,
color
,
flags
);
...
...
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