# Line Features Finder

This block allows the configuration of multiple line feature finders (for example, a line finder). When executed in a sequence, this block runs the configured finders on its input images and outputs a list of the found lines and graphics.

This block has three modes of operation:

- Setup Mode - An interactive editor is used to add, remove or modify the feature finders. A version of this interactive editor is available in the HMI Toolbox, under AlignPlus->Alignment->Line Features Finder. Alternatively, the public methods provided by the block can be used for this purpose.

- Reference Part Mode - The block is executed and the feature finders will be run as they should be on a reference part.

- Runtime Mode - The block is executed and the feature finders will be run as they should be for a runtime part.

Two types of line feature finders are supported:

- A line finder, represented by a VisionPro CogFindLineTool tool. This tool is set up to run on a single selected camera image.

- A custom feature finder, represented by a VisionPro CogToolBlock. The tool block contains input terminals to receive an image set from a single camera and output terminals to return the located line feature results. The tool block can use all the images in the image set to locate a single feature.

When adding feature finders, a given input image can have multiple feature finders configured for it, and some input images need not have any feature finders.

The output result for the block is a list of elements of type CogAlpsLineFeature, where each entry will have the feature location, a Boolean that indicates if the feature was found, a camera identifier and an image identifier. Additionally, the block will output a set of graphics of type CogGraphicCollections, one for each camera, which can be used to display the features location graphics. Each collection will contain the graphics generated by all the feature finders for the corresponding camera. It is expected that a collection will be combined with an appropriate image to generate a VisionPro record for display.

## General Information

Class name: LineFeaturesFinderBlock

Namespace: Cognex.Designer.AlignPlus.Alignment

Assembly: Cognex.Designer.AlignPlus.Alignment.dll

## Inputs

Name | Type | Description
--- | --- | ---
Cam0Image | ICogImage | Image from specific camera
Is Reference Part | Boolean | True: train time reference feature False: run time For custom tool block, it depends on user how to utilize this parameter
User Data | CogDictionary | Dictionary type of data available for user to feed more information into toolblock. When there is no data needed, still an empty user data need to link to this pin, otherwise, toolblock will consider this pin as null and pop out an error when running

## Outputs

Name | Type | Description
--- | --- | ---
Feature Graphics0 | CogGraphicCollection | A collection of graphics on one image to show where the feature is. This can be configured/customized on UI.
IsNG | Boolean | True: features are all found False: one or more features are not found
Line Features | List<CogAlpsLineFeature> | A list of features in which feature’s location, name, and many other properties are all included.

## Properties

Name | Type | Description
--- | --- | ---
Number of Cameras | Integer | Get/set the number of cameras supplying images to this block The total number of CamXImage pins or is equal to the Number of Cameras property. The number of pins changes immediately upon a change to this property. Throws System.ArgumentOutOfRangeException: If it is set to a value out of expected range
Number of Images Per Camera | Integer | The Number Of Images Per Camera property controls the number of images expected for each camera. If this property is greater than one, then the block will accept image sets (CogImageCollections) for its input pins. The purpose of accepting an image set from each camera is to allow feature location to be performed on images captured under different acquisition conditions from a single camera. Throws System.ArgumentOutOfRangeException: If it is set to a value out of expected range
Selected Space | String | Get/set the selected space in which the finders run. The selected space is the coordinate system in which all feature finders return results (such as locations, distances and graphics) and in which the tools interpret input data (such as regions of interest). Each input image should allow the mapping of image features in the corrected image to this selected space. All the feature locations will be generated in the selected space. The graphics generated by the first feature finders (line finder) will also be in this space. If the selected space is not present in the coordinate space tree of an image to be used for feature location, a suitable exception will be thrown when the sequence block is executed.