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
c684da35
Commit
c684da35
authored
Feb 04, 2014
by
Konstantin Matskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drawing
parent
92c8b94b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
core.hpp
modules/core/include/opencv2/core.hpp
+6
-6
drawing.cpp
modules/core/src/drawing.cpp
+17
-6
No files found.
modules/core/include/opencv2/core.hpp
View file @
c684da35
...
...
@@ -507,11 +507,11 @@ CV_EXPORTS_W void randn(InputOutputArray dst, InputArray mean, InputArray stddev
CV_EXPORTS_W
void
randShuffle
(
InputOutputArray
dst
,
double
iterFactor
=
1.
,
RNG
*
rng
=
0
);
//! draws the line segment (pt1, pt2) in the image
CV_EXPORTS_W
void
line
(
CV_IN_OUT
Mat
&
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
CV_EXPORTS_W
void
line
(
CV_IN_OUT
InputOutputArray
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
,
int
shift
=
0
);
//! draws the rectangle outline or a solid rectangle with the opposite corners pt1 and pt2 in the image
CV_EXPORTS_W
void
rectangle
(
CV_IN_OUT
Mat
&
img
,
Point
pt1
,
Point
pt2
,
CV_EXPORTS_W
void
rectangle
(
CV_IN_OUT
InputOutputArray
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
,
int
shift
=
0
);
...
...
@@ -521,18 +521,18 @@ CV_EXPORTS void rectangle(CV_IN_OUT Mat& img, Rect rec,
int
lineType
=
LINE_8
,
int
shift
=
0
);
//! draws the circle outline or a solid circle in the image
CV_EXPORTS_W
void
circle
(
CV_IN_OUT
Mat
&
img
,
Point
center
,
int
radius
,
CV_EXPORTS_W
void
circle
(
CV_IN_OUT
InputOutputArray
img
,
Point
center
,
int
radius
,
const
Scalar
&
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
,
int
shift
=
0
);
//! draws an elliptic arc, ellipse sector or a rotated ellipse in the image
CV_EXPORTS_W
void
ellipse
(
CV_IN_OUT
Mat
&
img
,
Point
center
,
Size
axes
,
CV_EXPORTS_W
void
ellipse
(
CV_IN_OUT
InputOutputArray
img
,
Point
center
,
Size
axes
,
double
angle
,
double
startAngle
,
double
endAngle
,
const
Scalar
&
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
,
int
shift
=
0
);
//! draws a rotated ellipse in the image
CV_EXPORTS_W
void
ellipse
(
CV_IN_OUT
Mat
&
img
,
const
RotatedRect
&
box
,
const
Scalar
&
color
,
CV_EXPORTS_W
void
ellipse
(
CV_IN_OUT
InputOutputArray
img
,
const
RotatedRect
&
box
,
const
Scalar
&
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
);
//! draws a filled convex polygon in the image
...
...
@@ -582,7 +582,7 @@ CV_EXPORTS_W void ellipse2Poly( Point center, Size axes, int angle,
CV_OUT
std
::
vector
<
Point
>&
pts
);
//! renders text string in the image
CV_EXPORTS_W
void
putText
(
Mat
&
img
,
const
String
&
text
,
Point
org
,
CV_EXPORTS_W
void
putText
(
InputOutputArray
img
,
const
String
&
text
,
Point
org
,
int
fontFace
,
double
fontScale
,
Scalar
color
,
int
thickness
=
1
,
int
lineType
=
LINE_8
,
bool
bottomLeftOrigin
=
false
);
...
...
modules/core/src/drawing.cpp
View file @
c684da35
...
...
@@ -1568,9 +1568,11 @@ PolyLine( Mat& img, const Point* v, int count, bool is_closed,
* External functions *
\****************************************************************************************/
void
line
(
Mat
&
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
void
line
(
InputOutputArray
_
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
int
thickness
,
int
line_type
,
int
shift
)
{
Mat
img
=
_img
.
getMat
();
if
(
line_type
==
CV_AA
&&
img
.
depth
()
!=
CV_8U
)
line_type
=
8
;
...
...
@@ -1582,10 +1584,12 @@ void line( Mat& img, Point pt1, Point pt2, const Scalar& color,
ThickLine
(
img
,
pt1
,
pt2
,
buf
,
thickness
,
line_type
,
3
,
shift
);
}
void
rectangle
(
Mat
&
img
,
Point
pt1
,
Point
pt2
,
void
rectangle
(
InputOutputArray
_
img
,
Point
pt1
,
Point
pt2
,
const
Scalar
&
color
,
int
thickness
,
int
lineType
,
int
shift
)
{
Mat
img
=
_img
.
getMat
();
if
(
lineType
==
CV_AA
&&
img
.
depth
()
!=
CV_8U
)
lineType
=
8
;
...
...
@@ -1622,9 +1626,11 @@ void rectangle( Mat& img, Rect rec,
}
void
circle
(
Mat
&
img
,
Point
center
,
int
radius
,
void
circle
(
InputOutputArray
_
img
,
Point
center
,
int
radius
,
const
Scalar
&
color
,
int
thickness
,
int
line_type
,
int
shift
)
{
Mat
img
=
_img
.
getMat
();
if
(
line_type
==
CV_AA
&&
img
.
depth
()
!=
CV_8U
)
line_type
=
8
;
...
...
@@ -1647,10 +1653,12 @@ void circle( Mat& img, Point center, int radius,
}
void
ellipse
(
Mat
&
img
,
Point
center
,
Size
axes
,
void
ellipse
(
InputOutputArray
_
img
,
Point
center
,
Size
axes
,
double
angle
,
double
start_angle
,
double
end_angle
,
const
Scalar
&
color
,
int
thickness
,
int
line_type
,
int
shift
)
{
Mat
img
=
_img
.
getMat
();
if
(
line_type
==
CV_AA
&&
img
.
depth
()
!=
CV_8U
)
line_type
=
8
;
...
...
@@ -1672,9 +1680,11 @@ void ellipse( Mat& img, Point center, Size axes,
_end_angle
,
buf
,
thickness
,
line_type
);
}
void
ellipse
(
Mat
&
img
,
const
RotatedRect
&
box
,
const
Scalar
&
color
,
void
ellipse
(
InputOutputArray
_
img
,
const
RotatedRect
&
box
,
const
Scalar
&
color
,
int
thickness
,
int
lineType
)
{
Mat
img
=
_img
.
getMat
();
if
(
lineType
==
CV_AA
&&
img
.
depth
()
!=
CV_8U
)
lineType
=
8
;
...
...
@@ -1918,11 +1928,12 @@ static const int* getFontData(int fontFace)
}
void
putText
(
Mat
&
img
,
const
String
&
text
,
Point
org
,
void
putText
(
InputOutputArray
_
img
,
const
String
&
text
,
Point
org
,
int
fontFace
,
double
fontScale
,
Scalar
color
,
int
thickness
,
int
line_type
,
bool
bottomLeftOrigin
)
{
Mat
img
=
_img
.
getMat
();
const
int
*
ascii
=
getFontData
(
fontFace
);
double
buf
[
4
];
...
...
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