# FindCircle

Locates a single circular edge within an annular (circle or ring shape) image region. FindCircle forms one-dimensional projections of the image region by summing pixel values on concentric circles, scanned in the direction of increasing radius. Edge transitions are extracted from the projected image data.

Inputs

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references cell A0 , containing the AcquireImage function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications.. 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 A fixture is a coordinate location on the image that keeps the tool in the place determined by the 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 A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. as a Fixture, convert the real world units to pixel values using the TransWorldToPixel function. Note: Angles must be multiplied by -1, due to image space differences. 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, relative to the scan direction of the Edge Region. The function only reports edges of the specified polarity.
0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.
Find By | Specifies the edge selection technique the function uses to select an edge, amongst multiple edge candidates.
0 = best score (default) | Specifies that the edge with the highest score receives the highest consideration.
1 = smallest circle | Specifies that the smallest circle detected receives the highest consideration.
2 = largest circle | Specifies that the largest circle detected receives the highest consideration.
Accept Thresh | Specifies the minimum acceptable edge contrast (0 to 100; default = 25); the contrast value is normalized from the greyscale histogram A histogram is a graphical representation of the distribution of pixel intensity values. A histogram refers to an array of pixels - how many and their individual greyscale values - within a region of interest (ROI). within the Region to a scale of 0 to 100. The function rejects any edge whose contrast score falls below this value.
Normalize Score | Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula: Score = (Raw Edge Score) x (100/Max Contrast) Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region. When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used: Score = (Raw Edge Score) x (100/255)
0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Note: Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.
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 FindCircle graphical overlays on top of the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindCircle function is the active cell in the spreadsheet.
1 = result graphics only | The circular edge will be displayed at all times.
2 = input and result graphics | Both the input image region and the circular edge will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the circular edge, and the edge response chart will be displayed at all times.

Outputs

Returns | An Edge containing a single circular edge, or #ERR if any of the input parameters are invalid.
Results | When FindCircle is initially inserted into a cell, a result table is created in the spreadsheet using the following Edges Vision Data Access functions
Label | Function | Description
CentX | GetX(Edges, 0, 0) | The center x-coordinate.
CentY | GetY(Edges, 0, 0) | The center y-coordinate.
Radius | GetRadius(Edges, 0) | The radius.
Score | GetScore(Edges, 0) | The edge contrast score. Score is positive for black-to-white transitions, and negative for white-to-black transitions.