Screenshots     Download     Documentation     Tutorials     Partners     Resources     Contact     Forum     Search  

 

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. 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.

7. 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.

8. 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.

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

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

11. 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

SourceCanny Edges
Detected Circles in RedEdges

Variables

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 would be

circles = GetArrayVariable("CIRCLES")
for i = 0 to ubound(circles)-1 step 13
  radius = radius + circles(i+2)
next

SetVariable "total_radius", circles

See Also


Sobel
Canny
DOB

© 2008 RoboRealm. All Rights Reserved. | Contact | Glossary | Privacy | Disclaimer | Link to Us | Resources | Site Map