I have a polygon, originally created as a Bézier Curve (black outline on the picture), and then saved as a polygon with enough points to call it smooth (at this scale). Then this polygon was rasterized (binarized), the borders of this polygon were converted to vector format (the red outline on the picture).
I want to restore the original line from rasterized using the approximation method.
What is the best way to do this?
By “best method” I mean a method that will return the same original boundary (black outline) or the closest result to the original line.

This may be accomplished with Savitzky–Golay filter. There is implementation of this algorithm here. Because
scipy.signal.savgol_filteronly accept 1-demention arrays - the trick is to passXandYcoordinates of the polygon to the function separately.I am still figuring out which parameters is the best to use.