Skip to content

Commit 3fe1839

Browse files
saskatchewancatchsovrasov
authored andcommitted
Updated comments for cv::ellipse and cv::ellipse2Poly to clarify some behaviour that has confused some users.
Amend: Delete trailing whitespace to make doc tests happy
1 parent 636ab09 commit 3fe1839

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/imgproc/include/opencv2/imgproc.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4220,13 +4220,14 @@ CV_EXPORTS_W void circle(InputOutputArray img, Point center, int radius,
42204220

42214221
/** @brief Draws a simple or thick elliptic arc or fills an ellipse sector.
42224222
4223-
The function cv::ellipse with less parameters draws an ellipse outline, a filled ellipse, an elliptic
4223+
The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic
42244224
arc, or a filled ellipse sector. The drawing code uses general parametric form.
42254225
A piecewise-linear curve is used to approximate the elliptic arc
42264226
boundary. If you need more control of the ellipse rendering, you can retrieve the curve using
42274227
cv::ellipse2Poly and then render it with polylines or fill it with cv::fillPoly. If you use the first
42284228
variant of the function and want to draw the whole ellipse, not an arc, pass `startAngle=0` and
4229-
`endAngle=360`. The figure below explains the meaning of the parameters to draw the blue arc.
4229+
`endAngle=360`. If `startAngle` is greater than `endAngle`, they are swapped. The figure below explains
4230+
the meaning of the parameters to draw the blue arc.
42304231
42314232
![Parameters of Elliptic Arc](pics/ellipse.svg)
42324233
@@ -4468,7 +4469,7 @@ CV_EXPORTS_W bool clipLine(Rect imgRect, CV_OUT CV_IN_OUT Point& pt1, CV_OUT CV_
44684469
/** @brief Approximates an elliptic arc with a polyline.
44694470
44704471
The function ellipse2Poly computes the vertices of a polyline that approximates the specified
4471-
elliptic arc. It is used by cv::ellipse.
4472+
elliptic arc. It is used by cv::ellipse. If `arcStart` is greater than `arcEnd`, they are swapped.
44724473
44734474
@param center Center of the arc.
44744475
@param axes Half of the size of the ellipse main axes. See the ellipse for details.

0 commit comments

Comments
 (0)