MathGroup Archive 2010

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

Search the Archive

Re: Line into Image

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107484] Re: [mg107470] Line into Image
  • From: Francisco Javier Chávez Contreras <francisco.chavez at usach.cl>
  • Date: Sun, 14 Feb 2010 05:59:03 -0500 (EST)
  • References: <201002131024.FAA25612@smc.vnet.net>

Hello Patrick, really thanks for your help. I replaced the "img" with my
chart and the "Slider" with "Control[{h, 1, ny, Appearance -> "Open"}]" and
works perfectly! :]

I apreciate your help, thank you very much.


Cheers,

Francisco Chavez C.



El 13 de febrero de 2010 09:33, Patrick Scheibe <pscheibe at trm.uni-leipzig.d=
e
> escribi=F3:

> Hi,
>
> you could do it with ImageCompose. Just overlay your Image with the
> lines you want to have:
>
> SetAttributes[lines, HoldRest];
> lines[img_Image, output_] := DynamicModule[
>   {nx, ny, h, v},
>   {nx, ny} = ImageDimensions[img];
>   Column[{
>     Dynamic[
>      output =
>       ImageCompose[img,
>        Graphics[{Cyan, Thick, Line[{{1, h}, {nx, h}}],
>          Line[{{v, 1}, {v, ny}}]}, PlotRange -> {{1, nx}, {1, ny}}]]],
>     Slider[Dynamic[h], {1, ny}],
>     Slider[Dynamic[v], {1, nx}]
>     }]
>   ];
>
> lines[Import["http://sipi.usc.edu/database/misc/4.1.04.tiff";], outimg]
>
>
> your final image is stored in the variable "outimg" here.
>
> Cheers
> Patrick
>
> On Sat, 2010-02-13 at 05:24 -0500, Francisco Javier Ch=E1vez Contreras
> wrote:
> > Good Evening:
> >
> > I have a PNG image from a chart (curves), and i need to insert into it
> two
> > lines of cyan color. These lines have to be moved into the PNG using tw=
o
> > Sliders (one for the vertical line, and other for the horizontal line).
> >
> > I created the Slider using the "Control" function, because provide me t=
he
> > option for enter the values or "slide" a value.
> >
> > I created both cyan lines and saved into a variable, but i cant superpo=
se
> > these lines and move them.
> >
> > Can anyone of you help me "math friends"?
> >
> > Sorry my english!
> >
> >
> > Cheers,
> > Francisco Ch=E1vez C.
> > Santiago, Chile.
> >
> >
>
>



  • References:
    • Line into Image
      • From: Francisco Javier Chávez Contreras <francisco.chavez@usach.cl>
  • Prev by Date: Re: Line into Image
  • Next by Date: Re: Question about Optional[]
  • Previous by thread: Re: Line into Image
  • Next by thread: Re: Line into Image