Classify Objects Configuration

NI Vision Builder

Identify Parts Tab

How to Classify Objects

Main Tab

  1. In the Step Name control, enter a descriptive name for the step.
  2. Verify that the Reposition Region of Interest option is enabled if you want to link the region of interest specified in this step to a previously defined coordinate system.

    Link the region of interest to a coordinate system if the position of the object under inspection changes from image to image, and you need to adjust the position of the region of interest to match the new location of the object.

  3. If you have not trained the software for the classes you want to identify, click New Classifier File to launch the NI Classification Training Interface. Follow the instructions on the training interface to learn the classes you want to identify.

    Refer to the NI Classification Training Interface Help for more information about how to train and classify objects in the Classification Training Interface.

  4. If you have trained the software for the classes you want to identify, click the Browse button to select the path to the classifier file. When you have selected the classifier file, the path to the file appears in the Classifier File Path control.
    Note  Click Edit Classifier File to launch the NI Classification Training Interface and edit the classifier file.
  5. Draw a region of interest around each sample you want to classify.

    Vision Builder AI segments objects in the region of interest by drawing bounding rectangles around the objects found according to the current settings in the Main, Threshold, and Options tabs.

Threshold Tab

Configure options in the Threshold tab carefully. If you manually configure the threshold options, make sure that the classification engine correctly detects the objects in the region you specified. Otherwise, when you run the step, the classification will not find any objects in the region of interest.

  1. Select a threshold type. When you select Manual Threshold, you must set the type of object to look for using the Look For control. You must also select the threshold range using the Min and/or Max control.
  2. Select the type of objects you want to classify. You can classify Bright Objects, Dark Objects, or Gray Objects.
  3. Enable the Ignore Objects Touching Region Borders control to ignore objects that touch the border of the region of interest.
  4. In the Remove Small Objects (# of Erosions) control, select the number of erosions to remove small objects in the sample from the region of interest.

The classification engine displays segmented objects in blue.

Options Tab

  1. Use the controls in the Options Tab to select the Method and Metric settings used by the classification engine for object classification.
  2. Enable the Scale Dependent control to determine the relative importance of scale when classifying objects. Enter a numerical scale value between 0 and 1000 in the Scale Factor control. If the value is 0, objects are classified independent of scale.
  3. Enable the Mirror Dependent control to determine the relative importance of mirror symmetry when classifying samples. Enter a numerical value of importance between 0 and 1000 for the mirror symmetry in the Mirror Factor control. If the value is 0, objects are classified independent of mirror symmetry.

Classify Tab

  1. Select the checkbox next to the labels you would like to use the minimum classification score and minimum identification score criteria for identifying the objects in the region of interest.
    Note  Objects displayed in a different color with parentheses around them in the Results table are identified as Other because either the score falls below the minimum classification or identification score specified in the Classification Criteria table, or because the class is not selected in the Classification Criteria table.
  2. Enable the Classify Only Largest Object control to classify only the largest object. If this option is not selected, all objects in the region of interest will be classified.

Limits Tab

  1. If you want to specify the maximum and minimum number of objects allowable for a specific class, select the checkbox next to the class of interest and set the minimum and/or maximum number of samples you want to classify.