ViDiEL Classify Edit ControlCognex VisionPro 9.24

The Classify tool edit control provides a graphical user interface to the CogClassifyTool API, which you use to examine an input image and assign it one of several predefined classes.

ViDiEL_Classify_WholeControl

The edit control offers the following features:

  • A row of control buttons at the top provide access to the most common operations.
  • A set of function tabs allow you to train the tool with images from the camera or image database, as well as view results from acquired images.
  • An image display window contains the images you use to train the tool or the latest acquired image you want to classify.

See the topic Using a ViDiEL Classify Tool for details on how to train a Classify tool.

To include the edit control in your custom vision application, you must first add it to your Visual Studio .NET development environment. See the topic Adding Edit Controls to Visual Studio for more information.

See the following sections for more information:

Control Buttons

EL_Classify_toolbar

The following table describes the function of each button:

ButtonDescriptionFunction
ViDiEL_run
RunExamine and classify the Current.InputImage. To run the tool you must have trained classes.

ViDiEL_LocalDisplay

Local image display

Open or close the local image display window. A Classify tool supports the following image buffers:

  • The Current.InputImage buffer contains the latest acquired image.
  • The Current.SampledLabeledImage buffer contains the selected images from the Labeled Images column on the Train tab.
  • The Current.SampledUnlabeledImage buffer contains the selected image from the Unlabeled Images column on the Train tab.
  • The LastRun.InputImage buffer contains the latest acquired image and by default a label showing which class the tool assigns to this image.
ViDiEL_FloatingDisplay
Floating image displayOpen one or more floating image windows, which support the same image buffers as the local image display window.
ViDiEL_Open
OpenOpen a VisionPro persistence (.vpp) file that contains a set of saved properties for this vision tool object type. VisionPro reports an error if you try to open a .vpp file for another object type.
ViDiEL_Save
SaveSave the current properties of the vision tool to a VisionPro persistence (.vpp) file. The edit control allows you to choose between saving the vision tool with or without its image buffers and tool results.
ViDiEL_SaveAs
Save AsSave the current properties of the vision tool to a new VisionPro persistence (.vpp) file.

ViDiEL_Reset

Reset

Reset the vision tool to its default state.

The tool gives you a choice between resetting to the default-constructed state, which is appropriate when you are using it in a Visual Studio.NET application, or its template-initialized state, which is appropriate for QuickBuild applications.

ViDiEL_FloatingResults
Show Floating ResultsOpen a separate results window with the same contents as seen in the Results tab.
ViDiEL_ToolTips
Show ToolTipsEnable or disable the display of tooltips for individual items in the edit control.
ViDiEL_Help
HelpOpen this VisionPro online help file.
Region & Import Tab

Use the Region & Import tab to acquire images from an image database or a connected camera:

CognexViDiEL_Classify_RegionImportTab

See the topic Using a ViDiEL Classify Tool for details on using this tab to train a Classify tool. Use the following options to import images from a file or from a connectd camera:

ButtonDescription
Grab ImageImport the image currently stored in the Current.InputImage buffer.

Auto Grab

Automatically import every image coming from an image source into the tool.

With Auto Grab enabled, the Classify tool will not import more images than specified by Auto Grab Count.

Note: Be aware that with Auto Grab enabled and your CogJob in continuous run mode, QuickBuild might experience an acquisition overrun and stop importing images. To prevent acquisition overruns, open the Image Source dialog box and decrease the Acquisition rate to 1 frame per second:

ViDi_Segment_Theory_Introduction_DecreaseAcqRate

Import From File(s)Import the image from a single .bmp, .png, .jpeg or all the images in an image-database file. The button does not remove existing imported images from the tool.
Clear ImportsRemove all imported images from the tool.
Train Tab

Use the Train tab to assign imported images to predefined classes:

ViDiEL_Classify_TrainTab

See the topic Using a ViDiEL Classify Tool for details on using this tab to train a Classify tool.

Training Data

Use the Training Data tab to verify which training images have been assigned to a specific class. Also use the tab to assign classes to additional images:

ViDiEL_Classify_TrainingData

See the topic Using a ViDiEL Classify Tool for details on using this tab to train a Classify tool.

Graphics Tab

Use the Graphics tab to control which images the tool records and what labels they can display:

ViDiEL_Classify_Graphics

GraphicsDescription
Training Data

Controls whether the tool records:

  • The Current.SampledUnlabeledImage
  • The Current.SampledLabeledImage
  • The graphic for the train result on the Current.SampledUnlabeledImage
ResultsControls whether the tool records the LastRun.SampledInputImage and a graphic for the class label.
Diagnostics

Determine whether or not the input image is recorded as part of the diagnostic record, and whether the image is copied to the record or saved in the record as a reference.

Show Region displays the input region if you do not use the entire input image.

Results Tab

The Results tab displays the score for each defined class for the last image the Classify tool examined:

ViDiEL_Classify_ResultsTab