Well it really depends on what you need the mesh to do. (a jpeg is not a good source for this data) What i would do is use the original vector image but you can vectorize it later in for example illustrator or Photoshop:
in photoshop:
- make color a selection by copying it to a extra channel
- and convert to work path
- export as illustrator
In your 3d app:
- read the vector image in and extrude
- (optional) triangulate
img 1: raw n-gnon mesh and its triangulated counterpart. Done with maya and photoshop (using python)
img 2: Same technique different picture just to show that the technique does scale
If you don't want to use a 3d app then use a vector tracing code to make a vector trace extruding that is pretty easy just duplicate the vector at a different elevation then connect vertices and fill the holes.
Code for tracing can be found at for example http://autotrace.sourceforge.net/index.html