Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: draw line over an image
Replies: 1   Last Post: Dec 28, 2012 1:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Vincent

Posts: 3
Registered: 6/8/12
Re: draw line over an image
Posted: Dec 28, 2012 1:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Vincent " <saniutza@yahoo.com> wrote in message <kbklsv$r3p$1@newscl01ah.mathworks.com>...
> Hi,
> I've found info regarding how to draw a line on an image/picture however I would like to draw a line or circle in a different function that the one that the picture was created.
>
> picture is created in my opening function
>
> axes(handles.axes9);
> image1=imread('picture.png');
> test=image(image1,'Parent',handles.axes9);
> set(handles.axes9,'xtick',[],'ytick',[]);
> guidata(hObject,handles);
>
> when I push a button I want to make a circle on this picture
>
> axis(handles.axes9)
>
>
> I can call the axis where the picture is but from here I'm not really sure how to call the pictures handle. I was able to draw a line on the axes1 but thats not what I want.
> Thank you, Merry Christmas and a Happy New Year!


ok so what i ended up doing was this:

m=findobj(0,'tag','picture')
hold on
p1=[10,100]
p2=[100,20];
plot([p1(2),p2(2)],[p1(1),p2(1)],'Color','r','LineWidth',2)

it works... is there an easier way?


Date Subject Author
12/28/12
Read draw line over an image
Vincent
12/28/12
Read Re: draw line over an image
Vincent

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.