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. For more information, see FindCircle.

FindCircleMinMax Inputs

Syntax: FindCircleMinMax(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Annulus.X,Annulus.Y,Annulus.Inner Radius,Annulus.Outer Radius,Polarity,Minimum Contrast,Edge Width,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool 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. For more information, see Fixture and Vision Tools Functions.

The default setting is (0,0,0), the top leftmost corner of the image.

Row

The row offset, in image coordinates.

Column

The column offset, in image coordinates.

Theta

The angle of orientation, in the image coordinate system.

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

FindCircleMinMax Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

CentRow

GetRow(Edges)

The center row of the circular edge.

CentCol

GetCol(Edges)

The center column 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 the following Vision Data Access functions:

MinRow

GetRow(Edges, 1)

The row of the minimum radius point of the circular edge.

MaxRow

GetRow(Edges, 2)

The row of the maximum radius point of the circular edge.

MinCol

GetCol(Edges, 1)

The column of the minimum radius point of the circular edge.

MaxCol

GetCol(Edges, 2)

The column of the maximum radius point of the circular edge.

Contrast

GetContrast(Edges)

The average contrast between the foreground and background of the circular edge (in grey levels 0-255). Contrast is positive for black-to-white transitions and negative for white-to-black transitions.