You may download the open source Hybrid Vehicle Simulation software called Advisor (initialy developped by NREL). Available on sourceforge.
In this package, there is somewhere in the archive a directory called "image2map". This is developped explicitely for that purpose. BTW, the Advisor software being rather old, you may need to modify slightly the source code to make it work with newer version