Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how do i draw a circle on an image !

Subject: how do i draw a circle on an image !

From: nero

Date: 28 May, 2012 23:30:06

Message: 1 of 3

I am working on a project in which I have to create a gui contain two buttons :one to download a map and the other to draw a circle in a fixed position
So how can i do this .

Subject: how do i draw a circle on an image !

From: Nasser M. Abbasi

Date: 28 May, 2012 23:53:47

Message: 2 of 3

On 5/28/2012 6:30 PM, nero wrote:
> I am working on a project in which I have to create a gui contain
>two buttons :one to download a map and the other to draw a circle in a fixed position
> So how can i do this .

may be use hold on? I put the center in the middle. you can change
that. I am sure there are coordinate transformations functions for
images in Matlab toolboxes to do this translation better than what I did.

-------------------------
close all;
load mandrill
image(X)
colormap(gray)
axis square
[nRow,nCol]=size(X);
r = sqrt(nRow^2+nCol^2);
c = r/3*exp((0:1/300:1)*pi*2*sqrt(-1));
hold on;
plot(real(c)+nRow/2,imag(c)+nCol/2,'r','LineWidth',2)
-----------------------------------------

screen shot on my matlab

http://12000.org/tmp/052812/plot.png


--Nasser

Subject: how do i draw a circle on an image !

From: Peter Bone

Date: 29 May, 2012 10:38:07

Message: 3 of 3

"nero " <belgasmi.neyrouz@gmail.com> wrote in message <jq11pu$hlp$1@newscl01ah.mathworks.com>...
> I am working on a project in which I have to create a gui contain two buttons :one to download a map and the other to draw a circle in a fixed position
> So how can i do this .

If you want to draw it in the image matrix itself then try this

http://www.mathworks.co.uk/matlabcentral/fileexchange/14331-draw-a-circle-in-a-matrix-image

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us