Convert a contour from Approx None to Approx Simple

Hello,

I have a contour that is coded with all points.
I want to transform it into a APPROX-SIMPLE contour based that is made like find contours.

How to do it ?
Thank you

dunno, but approxPolyDP with zero tolerance (or epsilon because numerics) might probably give an equivalent result.

imho there ought to be something better than Douglas-Peucker (because that is no good for maintaining the mean position of lines) but I haven’t cared to implement anything better and apparently so hasn’t anyone else.