ComfyUI Node
cv2.approxPolyN
Raw wrapper of cv2.approxPolyN(curve, nsides, epsilon_percentage?, ensure_convex?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.approxPolyN
- curve
- nparray
◄nsides0►
◄epsilon_percentage-1.0000►
◄ensure_convextrue►
Categoryimage/CV/low-level/cv2 A
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| curve | NPARRAY | Input vector of a 2D points stored in std::vector or Mat, points must be float or integer. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| nsides | INT | 0-2147483648–2147483647 | The parameter defines the number of sides of the result polygon. |
| epsilon_percentageopt | FLOAT | -1.0000-1e+38–1e+38 | defines the percentage of the maximum of additional area. If it equals -1, it is not used. Otherwise algorithm stops if additional area is greater than contourArea(_curve) * percentage. If additional area exceeds the limit, algorithm returns as many vertices as there were at the moment the limit was exceeded. Preset to the OpenCV default (-1.0). |
| ensure_convexopt | BOOLEAN | true | If it is true, algorithm creates a convex hull of input contour. Otherwise input vector should be convex. Preset to the OpenCV default (True). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |