Fills the area bounded by one or more polygons
img = cv.fillPoly(img, pts)
[...] = cv.fillPoly(..., 'OptionName', optionValue, ...)
Input
- img Image.
- pts Array of polygons where each polygon is represented as an array
of points. A cell array of cell arrays of 2-element vectors, in the form:
{{[x,y], [x,y], ...}, ...}
, or a cell array of Nx2 matrices.
Output
- img Output image, same size and type as input
img
.
Options
- Color 3-element floating-point vector specifying polygon color.
default zeros
- LineType Type of the polygon boundaries. One of:
- 4 4-connected line
- 8 8-connected line (default)
- AA anti-aliased line
- Shift Number of fractional bits in the vertex coordinates. default 0
- Offset Optional offset of all points of the contours. default
[0,0]
The function cv.fillPoly fills an area bounded by several polygonal
contours. The function can fill complex areas, for example, areas with
holes, contours with self-intersections (some of thier parts), and so forth.