If there are algorithms that approximates curves into jagged lines, is there any way to do it in reverse? Given a jagged lines, we have to smoothens the lines into forming curves?
My purpose is I want to smoothen the first image borders but not removing the curves. I want it to look naturally as the second image.


Given a smooth curve, take discrete points along it and join adjacent pairs by line segments.
Given such a sequence of connected line segments, find their intersection points and use a B spline fit.