MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: get a table of coordinates from an image of a graph

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112473] Re: get a table of coordinates from an image of a graph
  • From: magma <maderri2 at gmail.com>
  • Date: Thu, 16 Sep 2010 06:02:28 -0400 (EDT)
  • References: <i6q0jk$l41$1@smc.vnet.net>

> Sorry if this is a daft question
>
> Peter Lindsay

Actually Peter this is a very interesting question that somehow has
been floating in my subconscious for some time.

Generalizing: given a jpg picture of some (relatively simple) line
drawing, how can we convert it into a Mathematica expression?

I have thought about it for the past few minutes and did some simple
experiments.
My conclusion is that not only it can be done, but also that it is
relatively simple, if one is satisfied with a "Flinstones
approach" (meaning: semi-manual).

The general idea is to import the picture and use it as a background.
Then you will draw on it using some tools (for example the ctrl-L
tools), aiding Mathematica in recognizing the key features of the picture. At
the end the imported picture is discarded and you are left with your
Mathematica drawing.
When I say "draw on it using some tools", this might mean building a
specialized small package which can (for example) draw a GraphPlot
with user-input vertex coordinates. the user inputs the coords via
mouse clicks on appropriate locations of the drawing.
On the other end, just using the Ctrl-L tools might be enough for some
purposes.
when you use the Ctrl-L feature, the drawing you make is added to the
imported picture in a way that can be separated with relative ease.
make some experiments an see for yourself. So you might draw your
graph manually with Ctrl-L tools and than separate and discard the
original picture.






  • Prev by Date: Re: Advice on Compile
  • Next by Date: Re: Extracting some elements, members of another list
  • Previous by thread: Re: get a table of coordinates from an image of a graph
  • Next by thread: Re: get a table of coordinates from an image of a graph