# FindMultiLine

Locates multiple straight-line edges within an image region. FindMultiLine forms a one-dimensional projection of the image region by summing pixel values on radial line segments scanned in the positive y-direction relative to the local coordinate system of the region. 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. 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)
Region | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis. Double-click on the Region parameter to create an Interactive Graphics Mode that you can transform and rotate. Select this parameter and press the Maximize Region button on the Job Edit toolbar of the property sheet to automatically stretch the region 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.
Width | The dimension along the X-axis of the region.
Height | The dimension along the Y-axis of the region.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the x-axis and the opposing boundary line of the region.
Note: The Fixture and Region parameters must be defined within the bounds of the image. Otherwise, the function returns #ERR.
Number to Find | Specifies the maximum number of edges the function will return (1 to sensor's image width, minus 1; default = 3). The maximum number of edges that may be detected is one less than the width of the image for the particular In-Sight camera capturing the image. For example, the maximum of an ISC 8402 camera is 1599, or one less than the 1600 x 1200 image resolution of the vision system.
Threshold B2W | Specifies the minimum acceptable black-to-white edge contrast score (0 to 100; default = 25). FindMultiLine will reject any black-to-white edges whose contrast score falls below Threshold B2W. Edge contrast is normalized by the greyscale histogram of the scan region.
Threshold W2B | Specifies the minimum acceptable white-to-black edge contrast score (0 to 100 default = 25). FindMultiLine will reject any white-to-black edges whose contrast score falls below Threshold W2B. Edge contrast is normalized by the greyscale histogram of the scan region.
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.
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 = first edge | Specifies that the first edge detected receives the highest consideration.
2 = last edge | Specifies that the last edge detected receives the highest consideration.
Angle Range | Specifies the tolerance of the function to edge rotation (0 to 10; default = 0). The function still finds edges that are outside of the specified range, but the accuracy may not be as high. Note: Setting this parameter to a value greater than 0 reduces the speed of the function.
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 FindMultiLine graphical overlays on top of the image.
0 = hide all (default) | All graphics are hidden, except when the cell containing the FindMultiLine function is the active cell in the spreadsheet.
1 = result graphics only | The found line edges are displayed at all times.
2 = input and result graphics | Both the input image region and the found line edges are displayed at all times.
3 = show all: input, result, and chart | The input image region, the found line edges, and the response chart of the edges are displayed at all times.

Outputs

Returns | An Edge data structure containing multiple straight-line edge segments, or #ERR if any of the input parameters are invalid.
Results | When FindMultiLine is initially inserted into a cell, a result table is created in the spreadsheet. One Edges Vision Data Access functions is automatically inserted into the spreadsheet to create the result table:
Label | Function | Description
--- | --- | ---
NFound | GetNFound(Edges) | NFound is the number of edges found.
Additional data elements can be accessed using Edges Vision Data Access functions.