Results Analysis ToolCognex VisionPro

This topic contains the following sections.

Each tool group or CogToolBlock supports a Result property to reflect the overall result from the latest image analysis. This property alone, however, might not accurately reflect the quality or quantity of the results from those tools.

Use a Results Analysis tool to set Result to one of Accept, Warn, or Reject based on a defined set of criteria. The tool can examine the results from one, several, or all the vision tools in a tool group or CogToolBlock in order to generate the desired Result value. For example, you can compare all the area results of a Blob tool against a predetermined value in order to determine that the Blob tool has detected the minimum number of features desired in the image.

Note: The Results Analysis tool is intended for use in QuickBuild applications, as there is no programmatic interface to it. If you later migrate your QuickBuild application to a Visual Studio .NET application, be aware that you cannot modify the generated source code for Results Analysis.

The Results Analysis tool can use a result expressed as a numeric value, a string, or a boolean value. In addition, the analysis can include an array, or vector, of result values. You can also specify your own constants.

A Results Analysis tool supports a large set of operations that can be performed on results, including arithmetic (addition, subtraction, multiplication, division), numerical comparison (less than, less than or equal, equal, greater than, and so on), string comparison (case sensitive equal, case insensitive equal), logic (And, Or, XOr, Not), vector-to-scalar or reducing logic (AndAll and OrAll), and math (Abs, Sqrt).

You can use multiple Results Analysis tools if you need to generate a Warn status based on one set of criteria and a Reject status based on another set of criteria. There is no limit to the number of Results Analysis tools you can use to generate status results for a tool group or CogToolBlock. The value of Result depends on the greatest value of all those generated, with Reject having the highest value. For example, if you use two Results Analysis tools in a CogToolBlock and one produces a Warn status while the other produces a Reject status, the value of Result for this CogToolBlock equals Reject.

If your application can determine the quality of an inspection based on only a single numeric value, such as the number of results found with a Blob tool or the print quality of a decoded symbol, you can use a Data Analysis Tool instead of a Results Analysis tool. The Data Analysis tool, however, cannot perform any mathematical operations on results, nor can it evaluate strings or boolean values.

See the topic Using Results Analysis for more information and an example on how to use the Results Analysis edit control.

Inspection Designer

A Results Analysis tool can be particularly useful when you are using the Inspection Designer features of VisionPro, where a CogToolBlock of vision tools is run against the images of an image-database and the Result property is compared to the grade each image had been previously assigned by you or another user. Use Inspection Designer features to confirm that the vision tools in a CogToolBlock generate the desired Accept or Reject result for images that have been previously examined by the end user of the vision application.

For more information on results validation, see the topic Inspection Design. For more information on how a CogToolBlock can be configured to perform results validation, see the topic Using a CogToolBlock.

Limitations

You cannot use Results Analysis to produce a set of results that differ only in size. For example, you cannot take the results of a Blob tool with a dozen blob results and generate a new collection holding only the three blob result objects whose area is greater than 100. In addition, you cannot use Results Analysis to produce a set of results based on order. For example, you cannot take the results of an ID tool and generate a new collection where the results are ordered by position from left to right.