# Search Modes

For each image you acquire, the OCVMax tool must locate the character string (or strings) you want to verify. The OCVMax tool supports three possible search modes:

- Position + Shift Uncertainty

  The OCVMax tool can be configured to start a search for each character string based upon where the string was found in the training image, and extending outwards along the x-axis and y-axis by a set of amount of pixels. The OCVMax tool uses the parameters X Shift and Y Shift to define the borders of the search area, as shown in the following figure:

  Of the three search modes, this mode offers the fastest possible search algorithm. Cognex recommends using Position + Shift Uncertainty whenever possible.

  The tuning feature of the OCVMax tool automatically uses Position + Shift Uncertainty. Once tuning is complete and you are testing the current set of OCVMax tool parameters on sample images, you can choose to switch to different search mode as appropriate for your application.

- Region

  You can configure the OCVMax tool to search for the character strings in a specific region of each image. If you choose this mode the OCVMax tool offers you a region graphic that you can position, size, and rotate around the area of the training image where the character string can appear.

- Whole Image

  You can configure the OCVMax tool to search each entire image for the strings you want to verify. The tool uses Cognex PatMax technology to perform the search.

  Of the three search modes, searching the whole image requires the most amount of time. Cognex recommends you use this option only when the position of the position of the character strings can vary across the entire image.

In addition, using a Fixture tool can greatly reduce the amount of X Shift and Y Shift you need to specify when you use the Position + Shift Uncertainty search mode, or reduce the size of the region you need to specify when you use the Region search mode. Be aware that using a Fixture tool has no impact on the search if you use the Whole Image search mode.