Here is the basic approach most folks will take.
I'm including some pointers to Microsoft help topics along the way which will hopefully help you get started.
When all is said and done, you'll probably need to spend time in the Microsoft Forums to get this all working if you're a neophyte Macro/Code writer in Office applications...but at least now you'll know what questions to ask.
- Use your image as a background in Visio (http://office.microsoft.com/en-us/visio-help/add-a-background-graphic-to-all-pages-in-your-visio-drawing-HA001083085.aspx#BMexisting)
- Draw whatever lines / shapes / etc., you want over your images
- Create a Macro which exports the points of the shapes you drew in the previous step.
How do you create a Macro?
- Make sure the "Developer" toolbar or ribbon is displayed. Based on the version of Visio you're running, there are different ways to turn it on - please Google something like "Visio Developer Toolbar <your version>" or some such to find the instructions you need
- On the Developer Toolbar, click Visual Basic
- Right-click the Visio Objects folder and choose Insert | Module
- Add a procedure which will spit out points. Here's a sample written by my colleague Alan E. about a year ago:
Public Sub WriteTableauPointsFile()
Dim oShape As Visio.Shape
Dim oPath As Visio.Path
Dim oPoints() As Double
'Set the output file to be the same as the source file, but .CSV
oFileName = Left(ActiveDocument.FullName, Len(ActiveDocument.FullName) - 3) & "csv"
'Set the separator character
oSeparator = "|"
'If file already exists, delete it
If Dir(oFileName) <> "" Then
'Open the output file and write the header line
oFile = FreeFile
Open oFileName For Append As #oFile
Print #oFile, "ShapeNo" & oSeparator & "ShapeName" & oSeparator & "PathNo" & oSeparator & "PointNo" & oSeparator & "X" & oSeparator & "Y"
'Get all the shapes on the page
Set oShapes = ActiveWindow.Selection
'Cycle through the shapes
For Each oShape In oShapes
'Shapes can have multiple paths
For j = 1 To oShape.Paths.Count
Set oPath = oShape.Paths(j)
'Enumerate the points in each path with 0.5 sensitivity for curves
oPath.Points 0.5, oPoints
i = 0
Do While i < UBound(oPoints)
x = Int(oPoints(i))
y = Int(oPoints(i + 1))
i = i + 2
'Write the record for each point
Print #oFile, oShape.Index; oSeparator; oShape.Text; oSeparator; j; oSeparator; i; oSeparator; x; oSeparator; y
'Close the file and exit
You run the procedure above by using the Macros button on the Developer Toolbar.