In the sense that the following curves pictured in order will be rated 98%, 80%, 40%, 5% smooth approximating by eye.
My ideas:
(1) If the curves all follow some general shape like a polynomial curve then do curve fitting and calculate the total "distance from the curve" of the data.
(2) Count the number of times a slope line between two datapoints intersects the data lines (line segments between data points) and divide by the number of data samples.
Your ideas?
Best Answer
Regard your data points as simple support points through which an elastic thin beam has to pass. The beam deforms to a curve that minimizes the energy required for bending it. You might be interested in that amount of energy. It can be used to measure the beam curve's deviation from a straight line.
The simplest theory for thin elastic beams is Bernoulli's beam theory, and its solution for the given problem is equivalent to cubic spline interpolation.
Without going into much details, the method would therefore be the following:
Do not forget to test your implementation: For example, constant-slope lines should have bending energy $W=0$.