# Training and Tuning

An OCVMax tool must be trained in order to reliably locate the characters in the strings you want to verify. VisionPro uses Cognex PatMax technology to train the OCVMax tool based upon an actual image of the string(s). Before you can configure an OCVMax tool you must acquire an image of a character string showing the characteristics you expect the tool to encounter when you deploy your vision application to the production environment.

As you train an OCVMax tool you select the amount of noise, or false image data that the training image contains. Image noise can come from a variety of sources, including irregular lighting and camera optics. Well-lit images with good contrast typically have low noise values. In practice, higher quality images produce better and faster results.

As you train an OCVMax tool you select the amount of noise, or false image data that the training image contains. Image noise can come from a variety of sources, including irregular lighting and camera optics. Well-lit images with good contrast typically have low noise values. In practice, higher quality images produce better and faster results.

The amount of time an OCVMax tool requires for tuning will vary depending on the number of characters and the type of font you use. Some character strings can require a significant amount of time to tune an OCVMax tool for successful use. For this reason, the graphical interface for the OCVMax tool provides a mechanism for indicating how far along any single tuning operation has proceeded, and how much more processing time is required for the tuning operation to complete.

Tuning is optional. Although you can disable automatic tuning as you train an OCVMax tool, it can be difficult for you to determine the best settings for various image and character-to-character parameters that allow the underlying PatMax technology to locate the strings in successive images.

The tuning operation is not always successful. In some cases, the OCVMax tool can report a failed attempt at tuning. In general, tuning fails for one of two reasons:

- The string you rendered to train the OCVMax tool does not match the actual string that appears on the training image.
- The tool graphics for the string are not close enough for Cognex PatMax technology to locate the actual string in the training image.

Finally, an OCVMax tool should be able to reliably locate and verify the characters in valid character strings once the tuning operating has completed. Be aware, however, that the time required to perform a verification can be excessive. By manually adjusting various search parameters after the tuning operating has assigned good starting values, you can typically reduce the amount of time required by the OCVMax tool to locate and verify the character strings in the images you acquire.