Skip to content

Commit 666fc0b

Browse files
committed
Merge pull request opencv#9986 from terfendail:drawcontours_docfix
2 parents cfd845a + ec076bf commit 666fc0b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/imgproc/include/opencv2/imgproc.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4584,6 +4584,11 @@ draws the contours, all the nested contours, all the nested-to-nested contours,
45844584
parameter is only taken into account when there is hierarchy available.
45854585
@param offset Optional contour shift parameter. Shift all the drawn contours by the specified
45864586
\f$\texttt{offset}=(dx,dy)\f$ .
4587+
@note When thickness=CV_FILLED, the function is designed to handle connected components with holes correctly
4588+
even when no hierarchy date is provided. This is done by analyzing all the outlines together
4589+
using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved
4590+
contours. In order to solve this problem, you need to call drawContours separately for each sub-group
4591+
of contours, or iterate over the collection using contourIdx parameter.
45874592
*/
45884593
CV_EXPORTS_W void drawContours( InputOutputArray image, InputArrayOfArrays contours,
45894594
int contourIdx, const Scalar& color,

0 commit comments

Comments
 (0)