Tuning Symbol Recognition Template Library
The Symbol Recognition Template Library (SRTL) – is a library of symbol templates that used for symbol recognition and replacing in tracing, automatic vectorization, object selecting and also in Search and Replace as alternative method.
The procedures of selection, tracing and automatic vectorization of raster symbols are based on algorithms of raster symbol recognition by vector patterns. These vector patterns should be created before performing recognition activities.

The Search item is a vector or raster template that should be recognized. The Replace item is a vector or raster template, which should replace the corresponding to it Search item.
Every WiseImage command that uses SRTL tries to find a regular Search template in the document or on the raster image. In case of success, command replaces recognized symbol with the corresponding Replace template.


Symbol Recognition Template Library editor overview
The SRTL can be trained to recognize any raster or vector symbol. For this purpose users can add new symbol templates to one of the available libraries or create an entire new library.
Using the Symbol Recognition Template Library editor you can create, save in .SRT file for future use, open and edit these libraries. The user can select to exclude symbol templates from recognition process by simply deactivating them. You can import obsolete symbol template formats such as .SST.
To open SRTL editor choose Edit Symbol Recognition Template Library: from the Convert menu or press the 

The left part of the dialog box displays the contents of the current template library. This box shows the topological tree of Replace and Search templates. Collapsed Replace items are marked with 


The Replace item will be ignored during symbol recognition if all its Search items are excluded.
On the left there is an example part of the SRTL, which included only Replace_2 with Search_1 items. The Replace_4 item will be ignored because of excluded Search_1 item.
SRTL basic operations
Choose Edit Symbol Recognition Template Library from the Convert menu or press the 
Any SRTL could be saved to or opened from *.SRT file. To save current library into a file click the 


Since libraries are stored in separate files, these can be deleted and copied, using standard operating system tools.
To insert a symbol template saved in an obsolete format, click the 
Vector symbol template
Vector symbol templates are marked with 
Before defining such a template for raster symbols recognition, create vector objects resembling the raster symbols. This can be done through vectorization, tracing or simply by drawing vector objects.
The set of such vector objects is used as a vector template. The template can consist of any set of objects, but for recognition only objects like line, arc, circle and polyline are used. The objects of a template can also be united in the block.
New vector template could be added to SRTL as Replace item or as Search item. When “Add Replace item” was performed, SRTL create new Replace item and associated new Search item with the same topological structure. The Search item could be added only to existing and selected Replace item.
Search item can have connecting lines. The setting of connecting lines increases the accuracy of symbols recognition, due to more exact and flexible description of the symbol geometry.
The connecting line is a vector object included in the template. One end of the connecting line joins the other objects in the template; the other end is free. The length of symbol parts corresponding to connection lines can be arbitrary. What matters are the position of points at which these objects join other symbol objects and contiguity angles.




The figure illustrates a symbol template where the connecting lines are worth adding
An arbitrary number of connecting lines can be specified. If the connecting lines are set in the symbol template, then only those symbols will be retrieved which have raster straight lines similar to the symbol’s, with the same points and at the same angles, as on the template; their lengths can differ from the length of the connecting line set in the template.
To create new vector symbol template
1 Draw vector objects, approximating raster symbols, or create them using vectorization or tracing procedures. Because of SRTL editor window is modeless, these operations can be done even this dialog is open.
It is recommended to unite objects of a vector template in a block. After vectorization with symbol recognition or after the Search and Replace operations all named blocks can easily be replaced with other graphic symbols, for example, by applying the standard procedure of block redefinition.
2 Select created objects, using standard vector selection tools.
3 To add selected vector objects as Replace item click the 
To add selected vector objects as Search item select appropriate vector Replace item in the left dialog window, because the Search item could be added only to existing Replace item. It is not possible to add vector symbol template as a Search item for a raster Replace item. Click the 
4 Select the newly added Search item in the left dialog window.
5 Click the 
Note that the line of connection should be a segment with one end adjoining to template objects, and another being free. Otherwise, the program will not assign the object to the connecting line.
Raster symbol template
Raster symbol templates are marked with 
When raster symbol template is added to the library as Replace item, SRTL does not automatically create a corresponding to it Search item. This should be done manually.
A raster symbol template could be added as Search item for raster or vector Replace item. However, it is not possible to add a vector symbol template as a Search item for a raster Replace item.
To create new raster symbol template
1 Open a raster image and select some raster objects, using standard raster selection procedures. Because of SRTL editor window is modeless, these operations can be done even while this dialog is open.
2 To add selection as Replace template click the 
To add raster selection as Search template select appropriate vector or raster Replace item in the left dialog window, because the Search item could be added only to existing Replace item. Click the 
SRTL editor dialog buttons and controls
| Left dialog window (topological tree window) Shows structure of current Symbol Recognition Template Library (SRTL). |
| Right dialog window (template window) Shows content (template) of selected library item. |
|
New-Creates a new empty SRTL. |
|
Open – Load a library from *.SRT file into SRTL editor dialog. |
|
Import- Import an old symbol template format (*.SST) in current library |
|
Save- Saves the active (current) library in current *.SRT file. |
|
Save As- Saves the library in a new *.SRT file. |
|
Select Connection Lines- Allows to select connecting lines in the symbol template window of the dialog (useful only for vector template of Search item). |
|
Add Search Item- Attaches Search item to the specified Replace item. The Replace item must be selected beforehand in the search-replace topological tree of the dialog. |
|
Add Replace Item- Adds Replace item to the SRTL. |
|
Delete- Deletes selected item from library. |
To exclude an item from recognition process, just remove checkmark on the left of the item’s name without deleting it from the library. The item is deactivated.




Post your comment on this topic.