# Read Tool

You can use the Read tool to identify letters, numbers, and symbols on a filmstrip image or live camera feed. The output of the Read tool appears on the image as a label at the top-left corner of the corresponding character and on the list of configured tools.

Note: The Read tool can only use a limited number of images for training. The maximum number of images you can train with the Read tool is 20 for color images and 100 for monochromatic images.

## To add the Read tool:

1. Select the Read tool under the ViDi EL Tools group in the Inspect application step.

2. Position the Search Region around the area to search. Position the Character Size region over the character you want to find. To resize the search boxes, click and drag the corners. To rotate the search boxes, click and drag the rotate button.

3. Click OK under the Directions box.

4. After you click OK, the Read tool appears in the list of configured tools, and the Read tool property edit panel opens up.

5. By default, the tool uses a pre-trained model to train the letters and numbers in the Search Region automatically. In the simplified settings, the tool uses the V2 Standard model in the Pre-Trained mode.

   To access all available pre-trained models, click the Advanced Tool Settings button in the top right corner of the settings pane. If the Training toggle is set to Pre-Trained, the Pre-Trained Model dropdown becomes visible, and you can select which model the tool uses.

   The following pre-trained models are available:

   - Pre-Trained V1 Standard: this model requires a tight bounding box for character size, and is best for monospace fonts. Supports uppercase characters, numerical digits, and the following special characters: ‘:’, ‘/’, ‘-‘, ‘+’, ‘&’

   - Pre-Trained V2 Standard: this model can recognize fonts with variable character size, and requires an input character size that fits the average character size. Supports uppercase characters, numerical digits, and the following special characters: ‘:’, ‘/’, ‘-‘, ‘+’, ‘&’

   - Pre-Trained V2 Complete: this model provides additional character support on top of the V2 Standard model. Supports uppercase and lowercase characters, numerical digits, all printable ASCII symbols and the € character.

   You can also train the tool manually. Click the Training toggle to switch from Pre-Trained to User-Trained mode. Two new fields appear: Train and Unique Characters in Samples.

Character size

Adjust the Character Size search box. The search box cannot be rotated. Place the character size around a character.

When using User Trained mode, or the Pre-Trained V1 Standard training mode, place the search box tightly around a character. This model works best with monospace fonts.

When using one of the Pre-Trained V2 training modes, place the search box loosely around an average-sized character. The V2 models can recognize variable width fonts. For example, if the text you want to process contains a W that is significantly wider than other characters, the search box can be smaller than the W, but needs to be bigger than a V.

If you are using the Pre-Trained V2 Complete model, which also supports lowercase characters, you can set the height of the character size box between the height of uppercase characters and the height of lowercase characters.

Fielding Match

You can set the tool to accept only certain characters or patterns under Fielding Match. There are two main settings, Variable number of characters and Fixed number of characters.

1. Variable number of characters

   The tool reads all the characters in the image.

   Acceptable Characters: Specify what type of characters the Read tool recognizes.

   - Any character: The tool searches for letters, numbers, and symbols (for example <, $, ?).

   - Numerical character only: The tool searches for numbers only.

   - Alphabetical characters only: The tool searches for letters only.

   - Alphanumerical characters only: The tool searches for numbers and letters.

   Number of lines: Tick the box next to Specify number of lines if the characters in your image are arranged in multiple rows. Enter the number of rows in the Number of lines input field.

2. Fixed number of characters

   The tool reads a character pattern or character patterns on the image. The tool recognizes characters that does not fit the provided pattern, but returns an error.

   The pattern uses a simple regular expression style composed of constant characters (alphanumerical and special characters) and metacharacters.

   You can use the following metacharacters:

   - "\d": matches any numerical character [0-9].

   - "\l": matches any alphabetical character [a-z, A-Z].

   - "\w": matches any alphanumerical character [a-z, A-Z, 0-9].

   Examples of valid patterns:

   - "\d\d\d\d": matches a number composed of four digits.

   - "\l\l\l": matches a word composed of three letters.

   - "\d\d:\d\d:\d\d": matches a time in the HH:MM:SS format.

   - "N\d\d\d\l\l\l": can be used to read a serial number starting with 'N', followed by 3 digits and 3 letters.

   You can apply multiple patterns for one Read tool configuration by clicking the Add Pattern button. If you provide multiple patterns the tool returns the name of the matching pattern during reading.

   Formula used: 1C4RJH\w\w\w\w\d\d\d\d\d\d\d | Formula used: Z1\w06456\d\d\d\d\d

Train

Train letters, numbers, and symbols to the tool.

1. Load your images by selecting the folder icon in the bottom-left corner. You cannot open individual pictures, only folders, so it is recommended to put all your images under one directory.

2. Type in the corresponding characters for the selected letters and numbers. Label and train all expected characters (A-Z, 0-9) for your application before deploying the tool. To use the Read tool you need to train at least 3 images. The more images and characters you train the higher the quality of your output will be. Also, fixturing with the pattern tool often leads to improved speed and tool performance.

   By default, the tool identifies possible characters in the image by placing a green bounding box around them. You can move the bounding boxes freely, but the size can only be modified under the Character Size setting. To add more bounding boxes, click one of the boxes and select the Add button. To remove a box, select it and click Remove. To remove all your boxes, select the Clear All option. To accept your settings, click Accept All.

   Note: Every character needs to be labeled in the search region. Removing labels from valid characters trains the tool to ignore them.

Unique Characters in Samples

Shows the number of trained characters and source images, and the confidence level of the tool in a given character. The lower the percentage is, the less likely that a result is correct.

You can see the percentage by hovering over the colored line under the character. The color also shows the confidence level:

- Green: high certainty.

- Yellow: medium certainty.

- Red: low certainty.

You can sort the trained data either by character or image:

You can jump to retraining a certain character by left-clicking its image under By Character view, or you can retrain all characters on one image by clicking the edit icon next to the appropriate row in By Image view.

You can also search for a specific character by typing it in the search bar under both views. The tool differentiates between upper-case and lower-case letters.

You can also delete samples by checking the box next to the appropriate row and clicking Delete Samples.