Constructors
constructor
- new Contour(): Contour
- new Contour(pts): Contour
- new Contour(pts): Contour
Properties
Readonly
area
area: number
Readonly
hierarchy
Readonly
isConvex
isConvex: boolean
Readonly
numPoints
numPoints: number
Methods
approxPolyDP
- approxPolyDP(epsilon, closed): Point2[]
Parameters
epsilon: number
closed: boolean
approxPolyDPContour
- approxPolyDPContour(epsilon, closed): Contour
Parameters
epsilon: number
closed: boolean
arcLength
- arcLength(closed?): number
Returns number
boundingRect
- boundingRect(): Rect
convexHull
- convexHull(clockwise?): Contour
Parameters
Optional
clockwise: boolean
convexHullIndices
- convexHullIndices(clockwise?): number[]
Parameters
Optional
clockwise: boolean
Returns number[]
convexityDefects
- convexityDefects(hullIndices): Vec4[]
Returns Vec4[]
fitEllipse
- fitEllipse(): RotatedRect
getPoints
- getPoints(): Point2[]
matchShapes
- matchShapes(contour2, method): number
Returns number
minAreaRect
- minAreaRect(): RotatedRect
minEnclosingCircle
- minEnclosingCircle(): {
center: Point2;
radius: number;
} Returns {
center: Point2;
radius: number;
}
minEnclosingTriangle
- minEnclosingTriangle(): Point2[]
moments
- moments(): Moments
pointPolygonTest
- pointPolygonTest(pt): number
Returns number