Approximates one or more curves and returns the approximation result[s]. In case of multiple curves approximation the resultant tree will have the same structure as the input one (1:1 correspondence).

C# | Visual Basic | Visual C++ |
public static IntPtr cvApproxPoly( IntPtr src_seq, int header_size, IntPtr storage, APPROX_POLY_TYPE method, double parameter, int parameter2 )

- src_seq (IntPtr)
- Sequence of array of points
- header_size (Int32)
- Header size of approximated curve[s].
- storage (IntPtr)
- Container for approximated contours. If it is NULL, the input sequences' storage is used
- method (APPROX_POLY_TYPE)
- Approximation method
- parameter (Double)
- Desired approximation accuracy
- parameter2 (Int32)
- If case if src_seq is sequence it means whether the single sequence should be approximated or all sequences on the same level or below src_seq (see cvFindContours for description of hierarchical contour structures). And if src_seq is array (CvMat*) of points, the parameter specifies whether the curve is closed (parameter2!=0) or not (parameter2=0).

the approximation result