title: Math - Curve Optimizing, Filtering, Smoothing
body: <p>I have been working for some time on a software in C# to optimize the measuring points of a CNC milling machine for the repair of alloy wheels.
  Unfortunately, I am not getting anywhere. The goal of the software is to analyze the measurement, to smooth the noise of the data, to interpolate curves and to remove measuring points in straight lines.</p>
  <p>The original contour is to be retained. At last I applied the Savitzky-Golay filter and the Akima interpolation.
  Unfortunately, the methods cannot be applied with one value over the whole curve, because this destroys the contour. Because of my lack of knowledge, it is not possible for me to automatically split the contour so that the procedures can be applied to individual segments.</p>
  <p>An example that has to be optimized can look like this <a href="https://i.stack.imgur.com/rVAjI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rVAjI.png" alt="example curve of CNC measurement points" /></a></p>
  <p>Manual selection of curve segments is unfortunately not an option, as the customer wants automation to be as complete as possible.</p>
  <p>I would be grateful if anyone has any ideas that could help me.
  Thank you very much for your effort.</p>
  <p>[Edit]
  I should mention that I am open if you know solutions in other languages, such as python.</p>