# Circles

The Circles module is a shape detection module that identifies contours within an image that are circular. The Circles module is meant to run after a contour based module (like Canny, DOB, Sobel, etc.) that identify edges within an image. Using these edges the Circles module will determine which contours are part of a circular shape and identify that shape for successive processing.Note that since the Circles module is contour based several edge processing routines can be applied prior to the Circles module to best create distinct contours.

## Interface

## Instructions

1. Threshold - Select the circle threshold. The threshold value sets the sensitivity of the circle detector. The lower the threshold the more partial circles will be detected. The higher the value the more complete and defined the circles will need to be.

2. Min Radius - Select the minimum radius of detected circles. Any circles detected whose radius is less than the minimum radius will be eliminated.

3. Max Radius - Select the maximum radius of detected circles. Any circles detected whose radius is more than the maximum radius will be eliminated.

4. Circle Solidity - Select how solid a detected circle needs to be. The circle solidity is a measure of standard deviation of a circle's pixel values. The lower the solidity percentage the larger the standard deviation. The higher the solidity percentage the lower the standard deviation which translates into a more purely solid circle (i.e. a flat same color circle).

5. Isolation - Select how close to each other can circles can be detected. The larger the isolation the more space between successive circles needs to exist. If you find that too many overlapping circles are detected increase the isolation number as this will reduce overlapping circles.

6. Isolation Scope - Determine what area is considered when determining if two circles overlap. It set to radius then the isolation is determined by adding the isolation pixels to the current circle size. Thus if any circles include each other the less stronger circle will be eliminated. If center is chosen then circles that are within X pixels of each other's center will tested for elimination.

7. Satistics Use - Select which image should be used to calculate the solidity and other circle statistics. Since the current image needs to be a contour image you will need to select which image can be used to access the circles original pixel data.

8. Circle Color - Select which color you would like to replace a detected circle with. The values [mean], [median] and [mode] relate to a circles statistical values of the original pixels. Circles will then be draw in that appropriate color.

9. Fill Circles - Select if you want to fill the detected circles with the appropriate color selected above. If "Fill Circles" is not selected then circles will not be filled and remain as thin circles.

10. Center Color - Select which color the X in the center of the circle will be draw using.

11. Radius Color - Select which color the circles radius will be draw in.

12. Overlay on - Select which image the circle will be draw on. If none is selected the circles will be draw on a black cleared image.

## Example

Source | Canny Edges |

Detected Circles in Red | Edges |

## Variables

CIRCLES_COUNT - the number of detected circles CIRCLES - contains an array of detected circles. The array contains blocks of 13 values per detected circles. The elements are as follows: Offset Contents 0 x coordinate of the center of gravity of the circle 1 y coordinate of the center of gravity of the circle 2 radius of the circle 3 standard deviation of the circle pixel colors 4 mean red color of the circle 5 mean green color of the circle 6 mean blue color of the circle 7 median red color of the circle 8 median green color of the circle 9 median blue color of the circle 10 mode red color of the circle 11 mode green color of the circle 12 mode blue color of the circle For example, to add up all the radii of detected circles the VBScript code would be circles = GetArrayVariable("CIRCLES") for i = 0 to ubound(circles)-1 step 13 radius = radius + circles(i+2) next SetVariable "total_radius", radius

To calculate the mean radius and standard deviation of the radius download the Circle Statistics Example robofile. Note that this includes an example image.

## See Also

Ellipses

Sobel

Canny

DOB

New Post |

Circles Related Forum Posts | Last post | Posts | Views |

Combine 2 different pipeline
Hi, I have 2 different pipeline for different detection characteristics which is: | 8 years | 18 | 3080 |

embryo detection
Hi there, I would like to track a transparent zebrafish embryo which is not a solid material. May I... |
9 years | 2 | 2282 |

Ellipse matching
The circle matching module does not seem to do a good job when the objects are elliptical. It tends to either match it (over fit... |
10 years | 2 | 2272 |

looking for screws
Is there a better way to do this? While the screw is patently obvious to the eye, I don't know if ... |
10 years | 2 | 2075 |

Roborealm and Vb.net
Please Help Me.... This is my activity in school. I presume you have some coins in your currency. I... |
11 years | 6 | 4748 |

Newbie circles
First time trying software out and am trying to follow the color tracking tutorial. What I would like to do is a little simpler... |
11 years | 13 | 8093 |

Detection of Circular Aluminum Disk on Grass
We are trying to detect a 3-inch diameter aluminum disk using various circle and blob detection algorithms on roborealm. Current... |
11 years | 3 | 3045 |

Color Ball Detection
I am working on a class project where I need to detect the color of black, white, or red ping balls moving down a conveyor and n... |
11 years | 2 | 2979 |

Circle Tracking and Alignment Check
hi everyone, i'm working on a system to check in real-time the alignment of a small circle within... |
12 years | 3 | 3247 |

training images
hi, i tried to train a simple image from a folder but roborealm closes when i start training... what is the soluti... |
12 years | 18 | 3813 |

Eye Tracking
I have a Trossen Robotics 'RoboTurret Vision Tracking' kit with me. The Kit is successfully interfaced with RoboRealm and able... |
12 years | 15 | 5027 |

Object recognition
Hi, i am busy on my graduation, and a part of my project is to write a module to detect obj... |
12 years | 7 | 4759 |

industrial inspection
I need to inspect a printed cardboard sheet that has round 3/4 inch magnets glued to th... |
12 years | 4 | 3088 |

Detecting black and white circles
Hello, I need to detect black and white circles in the image. I need to seperate them to make the c... |
13 years | 8 | 5404 |

Tracking tennis balls
I'm trying to track tennis balls in a playing field shown in the attached figures. A robot will move around until the closest t... |
13 years | 4 | 4490 |

Things about SetArrayVariable
hi, sorry to bother you. After I use [circles] to get the coordinates of these circles, I have a problem in storing them into a... |
14 years | 2 | 3249 |

Align two pictures
Hello, I am creating a program that grades scantrons. I use a webcam to capture... |
14 years | 6 | 10252 |

using if statement module
Hi, I have a question in using if statement module. I have used different modules in... |
14 years | 4 | 4129 |

Can you track these balls?
I'm new to Roborealm, and I'm learning all the modules and how to apply each module in each situation. | 14 years | 5 | 3645 |