# Circle detection

Page 1 of 1

## 5 Replies - 6604 Views - Last Post: 20 January 2010 - 04:26 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=150700&amp;s=95262927237cffef0fe2807830d5e48d&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 megabuh

Reputation: 0
• Posts: 5
• Joined: 19-January 10

# Circle detection

Posted 19 January 2010 - 09:04 AM

Hi,
please can somebody help me with circle detection (center and radius) in color image (ring, coin,...) In image is only coin or ring.

Thanks to everyone
Is This A Good Question/Topic? 0

## Replies To: Circle detection

### #2 SwiftStriker00

• No idea why my code works

Reputation: 438
• Posts: 1,611
• Joined: 25-December 08

## Re: Circle detection

Posted 19 January 2010 - 09:21 AM

Are you trying to find circles in a image file?

[rules] [/rules]

This post has been edited by SwiftStriker00: 19 January 2010 - 09:21 AM

### #3 megabuh

Reputation: 0
• Posts: 5
• Joined: 19-January 10

## Re: Circle detection

Posted 19 January 2010 - 09:35 AM

Yes,
Iīm trying to find circle in image file.
This isnīt a homework. It is my hobby.
I have more images with coins (1 coin in image file).
I had wrote an algorithm for transform the coin (ring) into the cartesian coordles (circle -> plain).
But I need for this algorithm x and y coordles of the center and radius. (So i must this data send to the algorithm myself).
So now I need to auto-detect the circle (center and radius) But I donīt know how to do it.

Thank you

### #4 SwiftStriker00

• No idea why my code works

Reputation: 438
• Posts: 1,611
• Joined: 25-December 08

## Re: Circle detection

Posted 19 January 2010 - 02:45 PM

One way will be is to have an algorithm itterate throught the pixels, setting that pixel to the given point and your going take a breadth first seach that will conitue to grow for some given param, untill you find like a majority of silver pixels

### #5 finaiized

Reputation: 0
• Posts: 84
• Joined: 29-November 09

## Re: Circle detection

Posted 19 January 2010 - 04:55 PM

Easier to use a image library like AForge.Net and use a Blob object.

### #6 megabuh

Reputation: 0
• Posts: 5
• Joined: 19-January 10

## Re: Circle detection

Posted 20 January 2010 - 04:26 AM

Yes, BlobObject is good. But How can I detect with it a circle?
Rectangle I can, but circle?

Thanks