There are a lot of such programs called vectorizers.
I used some of them several years ago (don't remember the names).
Choose any you like: http://www.google.com/search?q=vectorizer
... JPEG images to contour lines. In order ... several steps in a picture editing tool, such as ... Stylize, hit Trace Contour and select an edge ... contour lines. You can do this with the help of any picture ...