0
$\begingroup$
With[{
img = ImageResize[ExampleData[{"TestImage", "Lena"}], {escala}]},
   size = 1000;
    escala = 500;
     proporcion = size/escala;

  celda = 200;
n = size/celda;
sub = Subdivide[-1, 1, n];

With[{
    dimensions = ImageDimensions[img]},
        Manipulate[

    grid = 
Graphics[{}, GridLines -> {sub, sub}, PlotRangePadding -> None, 
 GridLinesStyle -> 
  Directive[White, Thick, Dashing[Tiny], Opacity[0.5]], 
 ImageSize -> ImageDimensions@img];
    Overlay[{img, grid}],

 {{pt, dimensions/2}, Locator, Appearance -> disk[r, White, pt]},
{{pt2, dimensions/2}, Locator, Appearance -> disk[r, Red, pt2]},

{{r, .05, Style["r", Bold, 15]}, .02, .5, .01, ImageSize -> 500},
ControlPlacement -> Top, 
Initialization :> (disk[r_, color_, pt_] := 
  Graphics[{{Opacity[.4, color], EdgeForm[Black], 
     Disk[{0, 0}, Scaled[r]]}, {Thick, 
     Line[{Scaled@{.5 - r/8, .5}, Scaled@{.5 + r/8, .5}}], 
     Line[{Scaled@{.5, .5 - r/8}, Scaled@{.5, .5 + r/8}}]}, {Text[
      Framed[Style[Row[pt, ","], Bold, 12], FrameMargins -> Tiny, 
       Background -> Opacity[.4, White]], Scaled@{.5, .52 + r}]}},
    ImageSize -> dimensions])]]]

I have a big amount of points like coordinates (x,y). I want to plot them over the image WITHOUT the axis.

In this case the img is 500x500 so a point like (250,250) will be near the right-sup corner.

The idea is to plot any coordinate over the image but not compulsory, for example:

P1=List[{0,0},{100,200}];
P2=List[{0,0},{-200,-300]];

I want to choose which P will appear over the img with OVERLAY,not everything at the same time.

$\endgroup$
4
  • $\begingroup$ Have you seen HighlightImage[]? $\endgroup$ Commented Dec 9, 2016 at 20:57
  • $\begingroup$ It is not what i am looking for. I am using the main images like a "map" and i want to add points like references. The points represent different kind of things. For example "Cities" or "monuments" or "parks", i don't want to show them all at the same time, and they have to be in a specific coordinate. $\endgroup$ Commented Dec 9, 2016 at 22:19
  • $\begingroup$ Then, have you seen this? $\endgroup$ Commented Dec 9, 2016 at 22:24
  • $\begingroup$ Yes but it is not what i am looking for. I am using this: Puntos= Graphics[{PointSize[0.01], White, Point[{Scaled[{0, .5}], Scaled[{1, 0.5}]}]}]; Grilla={Nogrid,Grid,Puntos}; Overlay[{img, grillas[[selector]]}], The problem is that "scaled" doesn't work well, i want to use the absolute coordinates (the "map" is 6200x6200) when i introduce Scaled(0,0) the point appears in (120,120) $\endgroup$ Commented Dec 10, 2016 at 14:09

0

Your Answer

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

Browse other questions tagged or ask your own question.