ViDiCheck

The ViDiCheck function allows you to create a deep learning-based verification solution, based around the Layout Model of the Blue Locate tool. The ViDiCheck tool allows you define the image features to be found in your images and associate them with a region using a Layout Model.

The ViDiCheck tool returns a pass or fail status for each region in the Layout Model, along with the names of the features associated with the regions in the model.

To use the ViDiCheck function:

  1. Select the ViDiCheck tool from the ViDi Tools dropdown in the Toolbox.
  2. Drag and drop the VidiCheck tool to the desired cell of the Spreadsheet.

  3. Set External Fixture in the Property Sheet that automatically opens:

    • Set to 0 if you do not want to use an external fixture.
    • Specify a fixture defined in another cell by clicking in the External Fixture text box, and then clicking on the cell in Spreadsheet, or by manually entering the cell reference.

  4. Set Region in the Property Sheet:

    • Define the X and Y offset from the Fixture origin and the region width and height in pixels, and the rotation of the region compared to the Fixture X axis in degrees.
    • Alternatively, double-click on Region and visually edit the region of interest.

  5. Click Open ViDi Editor in the Property Sheet to configure the ViDiCheck tool.
  6. Add the images that you want to include in your training set by dragging and dropping from the filmstrip. The bigger the training set, the more reliable the results.

  7. Label the features that you expect to make up your model:
    1. Click on an area of interest to create a feature box for the label.

    2. Center the feature box on the feature you want to label, and adjust the Feature Size parameter using the interactive white adjustment box in the bottom left corner of the image display.

      Note:

      If necessary for your application, you can enable direct feature box resizing and rotation by expanding the Tool Parameters sidebar and checking the Oriented and Scaled checkboxes. Select Non-uniform in the Scaled dropdown to enable freeform sizing.

      However, this will result in longer processing times, as it requires non-uniform scale and rotation measurements, and can also cause a higher rate of false matches. You can get better results labeling parts with different rotations, or adjusting the Rotation Perturbation parameter in the Tool Parameters sidebar.

    3. Place the box on the image feature that you want to train ViDi to look for.
    4. Name the label by clicking in the green textbox in the corner of the label.
    5. Repeat for each image feature and every image in the training set.

  8. Click the blue Brain icon at the top to train the tool.
  9. Add a Layout Model and configure one or more regions, along with the features expected to be within the region, and the sum of the features within the region. For more information about configuring the Layout Model, see the Creating a Layout Model topic.
  10. Review your training images and verify that the results are correct.

ViDiCheck 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 is passed into the ViDi tools, and is used to define the views for each image. When using an external fixture, within the Region of Interest (ROI), select External. Then, from the Image Database menu, select Update All Training Fixtures, and modify the ROI of the ViDi tool. You can also update the ViDi tool reference to the external fixture data by right-clicking the ViDi data structure and selecting Update Training Fixtures.

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 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 the graphical overlays of the ViDiCheck tool on top of the image.

0 = hide all (default)

Hides all graphics, except when the cell containing the ViDiCheck function is highlighted in the spreadsheet.

1 = result graphics only

Shows the result graphics at all times.

4 = input graphics only

Shows the input graphics at all times.

2 = input and result graphics

Shows the input and result graphics 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.

ViDiCheck Outputs

Returns

A ViDiCheck data structure, containing the results of the trained tool. The results are based on the names of the Layout Model regions contained within the tool, along with a pass/fail status for each region and the names of the features associated with the region.

Results

After the ViDiCheck tool has been trained, a result table can be generated, based on the ViDi Results Vision Data Access Functions, by right-clicking on the function's data structure and selecting Insert Getters.

Note: When the Vision Data Access Functions are automatically generated, the default setting auto-populates the first five features to the table. If there are more than five features, you need to manually add them to the table. If you want to display more entries, you can expand the table by copying the last row and pasting additional rows at the end. Make sure to increment the index number of any newly-pasted row so that the proper feature is indexed.
  "ViDiCheck Function Name" View Index Match Index ViDiMatch Region Index Check Region Check Region Name Expected Actual Region Pass Feature Name N Feature Name N Feature Name N Feature Name N Feature Name N
❒ViDiCheck ❒ViDiCheckResult ❒ViDiCheckView 0 0 ❒ViDiMatch 0 ❒ViDiCheckRegion Region1 1 1 1 0 0 1 0 0
            1 ❒ViDiCheckRegion Region2 2 1 0 1 0 0 0 0
            2 ❒ViDiCheckRegion Region3 1 1 1 0 1 0 0 0
Function Description

GetViDiCheckResult(ViDiCheck, ToolName)

Returns a ViDiCheckResult data structure, which contains all of the results from the referenced ViDiCheck function.

GetViDiCheckView(ViDiCheckResult, ViewIndex)

Returns a ViDiCheckView data structure, which extracts the results from the indexed view.

GetViDiMatch(ViDiCheckView, Match_Index)

Returns a ViDiMatch data structure, which extracts the matched model from the referenced view.

GetMatchCount(ViDiCheckView)

Returns the number of matches generated by the referenced ViDiLocateView, ViDiCheckView or ViDiReadView data structure.
GetViDiCheckRegion(ViDiMatch, Region_Index)

Returns a ViDiCheckRegion data structure, which, based on the Region Index, extracts the Layout Model region from the referenced ViDiMatch data structure.

GetString(ViDiCheckRegion)

Returns the name of the Layout Model region from the referenced ViDiCheckRegion data structure.

GetOccurences(ViDiCheckRegion)

Returns the number of features that the Layout Model region expects to encounter.

GetFeatureCount(ViDiCheckRegion)

Returns the number of features that the Layout Model region actually contains.

GetPassed(ViDiCheckRegion)

Returns a pass (1) or fail (0) based on the Expected versus Actual feature counts of the referenced Layout Model region. If the Expected equals the Actual, the function reports a pass, otherwise a fail is reported.