# 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: | 6 years | 18 | 2523 |

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

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... |
8 years | 2 | 1873 |

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 ... |
8 years | 2 | 1676 |

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

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... |
9 years | 13 | 3974 |

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... |
9 years | 3 | 2626 |

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... |
9 years | 2 | 2583 |

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... |
10 years | 3 | 2839 |

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

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

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

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

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... |
11 years | 8 | 5004 |

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... |
11 years | 4 | 4053 |

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... |
12 years | 2 | 2862 |

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

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

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. | 12 years | 5 | 3221 |