# Green Classify Tool

| The Green Classify tool is used to identify and classify an object, or the entire scene, in an image. It can also be used to sort objects or gate further analysis. Once a Green Classify tool has been trained, it will assign a tag to the image, which the tool uses to assign a class to an image. The tag is represented by a label, and is given a percentage declaring the certainty the tool has for the classification it has assigned.

There are a few ways the tool's classification capabilities can be used:

- It can be used to simply classify an object in an image, such as Part A, Part B, Part C, etc. In addition, it can be used as a gating tool, where it is used prior to other tools performing inspections downstream. For example, the Green Classify tool determines that it is Part B, which has a Red Analyze tool that performs further inspection, whereas if it was Part C, a Blue Locate tool would count features.
- It can be used downstream of a Red Analyze tool to classify the types of defects that were encountered, or after a Blue Locate tool to classify the type of Model that produced a particular View.

To use the tool, you provide a Training Set and then tag the images with an appropriate label. Once the images are labeled, train the tool. Then validate the tool by using images that were not used during training.

Note: For more information about configuring the Green Classify tool, see the Using the Green Classify Tool topic.
Note:

For the Green Classify tool, there is a fixed limit to the number of samples that can be processed for a single runtime image, which is 50,000. The number of samples is determined by the Feature Size, the image size, and the Sampling Density, as shown in the following equation:

If you have the Masking Mode parameter enabled, the sample count is reduced by the proportion of the pixels that are masked.

When the combination of image size, Feature Size and Sampling Density settings exceeds the limit, the following error message may be displayed:

Failed to process database sample 'image_file.name' (maximal number of samples exceeded, please reduce the sampling density, view size and/or feature size).

In this event, consider options to reduce the number of pixels being processed, either through the use of a mask, focusing the ROI to specific areas or using a larger feature size setting.