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

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references cell A1 . 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 the image coordinate system for the Vision Tools function. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. Note: 2D projections use real world units but fixturing with 2D tools requires input in pixel values. When using a 2D projection from a 3D point cloud as a Fixture, convert the real world units to pixel values using the TransWorldToPixel function. 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), it specifies the region of the image that undergoes analysis. It creates an annular image region that can be translated and rotated. With this parameter selected, by pressing the Maximize Region button on the toolbar of the property sheet, the region is automatically 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 returns #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 are 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 are displayed at all times.
2 = input and result graphics | The input image region, the circular edge, and the minimum and maximum deviation points are displayed at all times.

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