Thread Subject: Cirlce around a pixel

Subject: Cirlce around a pixel

From: Timothy

Date: 29 Jun, 2009 12:56:01

Message: 1 of 11

Simple question. How do I draw a circle around a certain pixel in an image.

Subject: Cirlce around a pixel

From: Rune Allnor

Date: 29 Jun, 2009 13:07:58

Message: 2 of 11

On 29 Jun, 14:56, "Timothy " <tluci...@brimrose.com> wrote:
> Simple question. How do I draw a circle around a certain pixel in an image.

imagesc(randn(64))
colormap(gray)
hold on
plot(32,16,'or','markersize',12,'linewidth',4)

Rune

Subject: Cirlce around a pixel

From: Timothy

Date: 29 Jun, 2009 14:29:02

Message: 3 of 11

Thanks, but I think this is not what I was looking for. I just want to draw a small circle around a pixel that I have identified as intense color.

Subject: Cirlce around a pixel

From: Rune Allnor

Date: 29 Jun, 2009 14:58:37

Message: 4 of 11

On 29 Jun, 16:29, "Timothy " <tluci...@brimrose.com> wrote:
> Thanks, but I think this is not what I was looking for. I just want to draw a small circle around a pixel that I have identified as intense color.

Then play with the parameters and see if you can
get what you want. Is

plot(32,16,'og','markersize',2,'linewidth',1)

better?

Rune

Subject: Cirlce around a pixel

From: Timothy

Date: 29 Jun, 2009 15:03:01

Message: 5 of 11

ill play with it... thanks

Subject: Cirlce around a pixel

From: Ilya Rozenfeld

Date: 29 Jun, 2009 16:04:01

Message: 6 of 11

You might try this

http://www.mathworks.com/matlabcentral/fileexchange/17741

"Timothy " <tluciani@brimrose.com> wrote in message <h2adl1$6go$1@fred.mathworks.com>...
> Simple question. How do I draw a circle around a certain pixel in an image.

Subject: Cirlce around a pixel

From: Ilya Rozenfeld

Date: 29 Jun, 2009 16:12:01

Message: 7 of 11

You might try this

http://www.mathworks.com/matlabcentral/fileexchange/17741

"Timothy " <tluciani@brimrose.com> wrote in message <h2adl1$6go$1@fred.mathworks.com>...
> Simple question. How do I draw a circle around a certain pixel in an image.

Subject: Cirlce around a pixel

From: Timothy

Date: 29 Jun, 2009 16:55:03

Message: 8 of 11

How do I set the transparency and color? [CH, CNTR, RAD] = DRAW_CIRCLE(radius, centroid,blue,transparent);

Subject: Cirlce around a pixel

From: ImageAnalyst

Date: 29 Jun, 2009 18:47:48

Message: 9 of 11

Timothy wrote:
> Simple question. How do I draw a circle around a certain pixel in an image.
----------------------------------------------------------------------------------------------------------------------
Believe it or not, you use (or can use) the rectangle() function. If
you type circle in the help index, it will tell you to use the
rectangle() function, which draws a rectangle with corners of a
certain radius of curvature. So, with proper x and y widths, and
proper corner curvature, you can get a circle. There are examples
there. Why they didn't make this it's own function is beyond me.
That would have been the best thing to do - just make special
functions for circle and ellipse. I mean, who would intuitively think
to look up the rectangle function if you wanted to draw a circle? A
circle should be a common enough thing to do that it deserves its own
function and not be a special case of some overly flexible rectangle
function.

Subject: Cirlce around a pixel

From: Ilya Rozenfeld

Date: 30 Jun, 2009 12:25:02

Message: 10 of 11

Say you want to interactively draw semistransparent blue circle, then the command is

draw_circle([], [], 'b', 0.5)

or

draw_circle([], [], [0 0 1], 0.5)

Note that transparency must be between 0 and 1. The circle will be fully transparent by default if you do this

draw_circle([], [], 'b')

"Timothy " <tluciani@brimrose.com> wrote in message <h2arl7$7k8$1@fred.mathworks.com>...
> How do I set the transparency and color? [CH, CNTR, RAD] = DRAW_CIRCLE(radius, centroid,blue,transparent);

Subject: Cirlce around a pixel

From: Tankozavr

Date: 29 Apr, 2011 14:00:21

Message: 11 of 11

"Timothy " <tluciani@brimrose.com> wrote in message <h2adl1$6go$1@fred.mathworks.com>...
> Simple question. How do I draw a circle around a certain pixel in an image.

figure, something with your peaks;
hold on
plot(x,y,'rx');
plot(x,y,'ro');

will give you either red crosses(RX) or red circles(RO)


hope this is what you wanted)

cheers

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
circle Timothy 29 Jun, 2009 08:59:03
rssFeed for this Thread

Contact us at files@mathworks.com