Jack Huang
Jack Huang

Reputation: 531

Convert time series into Bezier-smoothed chart, output chart bitmap to 2D array

I'm trying to Bezier-smooth a time series and convert it into a greyscale bitmap of its chart. To clarify, I essentially want C# to take a time series of data, virtually plot a smoothed chart a la Excel, convert this chart into a greyscale bitmap, and output the 2D numeric array of pixel values.

GDI+'s DrawBezier function seems to only directly create a visual display as output. If I redirect its output to an Image object, I think I can convert that into a pixel value array.

Upvotes: 1

Views: 622

Answers (1)

MK.
MK.

Reputation: 34537

Are you sure you want to use Bezier? I can't imagine how you would use Bezier curves to approximate data. Perhaps you want Polynomial Interpolation? As for drawing the cart, perhaps you should look into one of the many free charting libraries for .NET, like this one http://www.ujihara.jp/jbyjsharp/jfreechart/ (have not tried myself).

Upvotes: 2

Related Questions