Skip to content

Commit ec076bf

Browse files
authored
Update imgproc.hpp
rewrote the added note in perhaps a cleaner way
1 parent b9b553b commit ec076bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/imgproc/include/opencv2/imgproc.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4584,8 +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 In case function is called to draw all contours with filled interior (negative contourIdx and thickness) it process nested contours as shapes with holes.
4588-
In this mode function fill areas inner to odd amount of contours and avoid filling areas inner to even amount of contours using even-odd rule over all edges of all contours.
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.
45894592
*/
45904593
CV_EXPORTS_W void drawContours( InputOutputArray image, InputArrayOfArrays contours,
45914594
int contourIdx, const Scalar& color,

0 commit comments

Comments
 (0)