I have an elevation map stored as a raster. I'd like to fit a smooth "vector" curve to the contours of constant elevation. In my application, the data are actually geographic elevations, but the problem could be generalized to any function of two variables.
I can produce another raster with anti-aliased contour lines, and use that as input to the vector-fitting process, if that helps.
This question is similar, but I'm looking for a free library that I can use in my Java application, or an explanation of the algorithm I (a non-mathematician) can implement myself. Also, in my case, I've already found all of the "edges" I care about—I just need to vectorize them.
Another question touches on mine, but the poster never returned to explain how he implemented the final step, which is the part I'm missing.