# ViDi

The ViDi function allows you to construct a deep learning-based vision solution using one or more Cognex ViDi Tools.

Press the Open ViDi Editor button to open a separate tab where you can configure, edit and train your Cognex ViDi Tools.

## ViDi Inputs

### General Tab

Parameter | Description
--- | ---
Image | This argument must reference a spreadsheet cell that contains a valid Image data structure; by default, the cell references A0, the cell containing the Image data structure returned by AcquireImage function.
External Fixture | Specifies a reference to a Fixture or Fixtures data structure. This fixture data will be passed into the ViDi tools, and will be used to define the views for each image. When using an external fixture, within the ViDi tool's Region of Interest (ROI), you will need to select External. Then, from the Image Database menu, select Update All Training Fixtures, and then modify the ViDi tool's ROI. You can also update the ViDi tool's reference to the external fixture data by selecting the ViDi data structure, right-click and select Update Training Fixtures.
Region | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an Interactive Graphics Mode that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's Job Edit 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.
Width | The dimension along the region's x-axis.
Height | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Show | Specifies the display mode for ViDi tools graphical overlays on top of the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the ViDi function is highlighted in the spreadsheet.
1 = result graphics only | The result graphics will be shown at all times.
4 = input graphics only | The input graphics will be shown at all times.
2 = input and result graphics | The input and result graphics will be displayed at all times.

### Runtime Tab

Allows access to ViDi Processing Tool Parameters that can be modified while the job is online. These parameters do not require that the tool be retrained. You can drag and drop these parameter to the spreadsheet, and publish them to the HMI for operator interaction.

## ViDi Outputs

Returns | A ViDi data structure containing the neural network model of the ViDi tool or tools.
Results | When a ViDi function is inserted into the spreadsheet, a results table can be created, based on the ViDi Results Vision Data Access Functions by right-clicking on the ViDi data structure and selecting Insert Getters.