I have such a contour: DoesOpenCV have a function for approximating contours that could do this? I know that approxPolyDP not suitable for this. Also I know that I can use for this opening morphological operation. Also write if you know for sure that there is no such functionality in OpemCV, or you can advise the algorithm that can do it, or in general another library for work with contours. Thanks.