# FindCircleMinMax

Inspects the circularity of a continuous edge by finding the minimum and maximum deviations from the edge and the standard deviation of the radii of all points on the edge.

Note: FindCircleMinMax should not be used for locating circular edges; use FindCircle to locate circular edges instead.

## FindCircleMinMax Inputs

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage data structure. This parameter can also reference other Image data structures, such as those returned by the Image Vision Data Access Functions or Coordinate Transforms Functions.
Fixture | Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tools function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. The default setting is (0,0,0), the top leftmost corner of the image.
X | The X offset, in image coordinates.
Y | The Y offset, in image coordinates.
Theta | The rotation from the image X axis, in the image coordinate system. (+/-360 degrees clockwise)
Annulus | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an annular image region that can be translated and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
Inner Radius | The size of the inner radius.
Outer Radius | The size of the outer radius.
Note: The Fixture and Annulus parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Polarity | Specifies the polarity of the edge to be located, moving from inside to outside the circle, relative to the scan direction of the Region; the function will only report edges of the specified polarity.
0 = black-to-white (default)
1 = white-to-black
Minimum Contrast | Specifies the minimum greyscale contrast (0 to 255; default = 10) at each point along the circle.
Edge Width | Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.
Show | Specifies the display mode for FindCircleMinMax graphical overlays on top of the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindCircleMinMax function is the active cell in the spreadsheet.
1 = result graphics only | The circular edge and the minimum and maximum deviation points will be displayed at all times.
2 = input and result graphics | The input image region, the circular edge, and the minimum and maximum deviation points will be displayed at all times.

## FindCircleMinMax Outputs

Returns | An Edge data structure containing a single circular edge, or #ERR if any of the input parameters are invalid.
Results | When FindCircleMinMax is initially inserted into a cell, a result table is created in the spreadsheet. The following Edges Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:
Label | Function | Description
CentX | GetX(Edges) | The center x-coordinate of the circular edge.
CentY | GetY(Edges) | The center y-coordinate of the circular edge.
Radius | GetRadius(Edges) | The radius of the circular edge.
Min | GetMin(Edges) | The minimum deviation from the circular edge.
Max | GetMax(Edges) | The maximum deviation from the circular edge.
SDev | GetSDev(Edges) | The standard deviation from the radii of all points on a continuous edge.
Score | GetScore(Edges) | A measure of circularity of a continuous edge based on the radius of the circular edge and the standard deviation. The score will be higher for a small standard deviation and lower for a large standard deviation. Score is calculated using the following formula: Score = 100*(1 - 2*SDev/Radius)
Additional data elements can be accessed using Edges Vision Data Access Functions