-1
$\begingroup$

How can I get the coordinates of an image, and make Mathematica draw the image from the coordinates found? I am interested in just the outlines of the regions.

Here is an example of the kinds of images I'd like to process. enter image description here

$\endgroup$
6
  • $\begingroup$ Coordinates refer to a point; your image is made up of a bunch of points. Now, which? $\endgroup$ Jul 13, 2015 at 18:31
  • $\begingroup$ Is the skeleton you are looking for a cube with an S-shape on one of its sides? $\endgroup$
    – C. E.
    Jul 13, 2015 at 18:44
  • $\begingroup$ Oh, you want the outline $\endgroup$ Jul 13, 2015 at 18:45
  • $\begingroup$ You mean EdgeDetect? $\endgroup$
    – Feyre
    Jul 13, 2015 at 19:10
  • $\begingroup$ If you look closely, there is a "W" and "S", that need $\endgroup$ Jul 13, 2015 at 20:41

1 Answer 1

7
$\begingroup$

Click on your figure. Then a set of graphics tools will appear beneath your figure. Use the Coordinates Tool. One by one, click on the corners of the region you seek. Then use the window below to Copy Coordinates. Here the ones I get for the front W face of your figure:

{{72.5`, 507.5`}, {70.5`, 158.5`}, {135.5`, 140.5`}, {136.5`, 
  484.5`}, {209.5`, 459.5`}, {208.5`, 120.5`}, {280.5`, 
  98.5`}, {282.5`, 437.5`}, {350.5`, 425.5`}, {347.5`, 7.5`}, {6.5`, 
  108.5`}, {7.5`, 530.5`}, {72.5`, 507.5`}}

Then merely plot them:

Graphics[{Blue, 
  Polygon@{{72.5`, 507.5`}, {70.5`, 158.5`}, {135.5`, 
     140.5`}, {136.5`, 484.5`}, {209.5`, 459.5`}, {208.5`, 
     120.5`}, {280.5`, 98.5`}, {282.5`, 437.5`}, {350.5`, 
     425.5`}, {347.5`, 7.5`}, {6.5`, 108.5`}, {7.5`, 530.5`}, {72.5`, 
     507.5`}}}]

enter image description here

Of course, you can repeat this for each face of your figure, for instance with the S:

enter image description here

If you just want the "skeleton" our outline, use Line instead of Polygon:

enter image description here

$\endgroup$
11
  • $\begingroup$ yes, I needed something like this, thanks $\endgroup$ Jul 14, 2015 at 15:54
  • $\begingroup$ Sorry, do not leave me the coordinates of WS, the you can write please $\endgroup$ Jul 14, 2015 at 20:31
  • $\begingroup$ @juanmunoz Sorry, but I explained precisely how you could capture the points, gave you the points for the W, and I'm too busy to do more work for you. $\endgroup$ Jul 14, 2015 at 20:35
  • $\begingroup$ sorry to bother, but nobody is born knowing, it may seem easy for some, but for others it is not so, just thanks for your help. $\endgroup$ Jul 14, 2015 at 20:57
  • $\begingroup$ @juanmunoz Did you try to follow my explanation and directions in my solution? If so, where did you have problems? $\endgroup$ Jul 14, 2015 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.