Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Vincent
Posts:
3
Registered:
6/8/12
|
|
Re: draw line over an image
Posted:
Dec 28, 2012 1:09 PM
|
|
"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?
|
|
|
|