Inspection Process

Learn to build a recipe file to store the computer vision parameters.

We covered a lot of ground!

Every automated inspection project is unique, but the techniques we have studied will constitute the building blocks for most cases. With experience, you’ll learn to assemble these building blocks into an automated inspection pipeline.

You probably noticed that computer vision functions often require parameters in addition to an input image. For example, when we apply a threshold to a grayscale image, we must provide a threshold value. When we cascade multiple operations, the number of parameters grows, and the optimal values can be tricky to find.

In a manufacturing environment, it is common to encounter multiple products sharing some general features but having significant differences. For instance, in a sawmill, we might be tasked with designing an automated inspection system for 2x3 and 2x4 lumber pieces of various lengths. We can’t hard-code the parameters in our program because the various types of lumber pieces have different nominal dimensions and tolerances. On the other hand, because the objects are similar and the requirements are qualitatively the same, we’d want to run the same inspection code for the whole family of products.

Inspection process in a recipe

In a case like this, it is recommended to write an inspection code that can accommodate an array of products and record the parameters optimized for a specific product into a text file that we’ll call the recipe.

When an image of a manufactured product gets grabbed, a mechanism will determine which recipe corresponds to the product. If multiple products can pass on the conveyor and the only available information is the image, a classification CNN could identify the appropriate recipe.

The following sections describe the structure of an XML recipe to inspect lumber pieces.

There are three elements under the root element:

Get hands-on with 1400+ tech skills courses.