Skip to main content
This object represents a single training image. It contains character image which can be used during user pattern training. The training image can be set by loading a region of an image document as a training image using the SetImageData method. In Windows, the training image can also be set by loading an image from memory using the SetBitmapBits method.
You should set the SmallCharsHeight and BaseLine properties to correct values; otherwise, the trained pattern will not function properly.
The bottom edge of most characters (except those with descenders, like p, g, Q) is the base line. The SmallCharsHeight property should be equal to the height of the lowercase letters in the line without ascenders or descenders (like c, a, o), even when you are training the pattern for an uppercase letter or a letter which has ascender/descender/diacritics (like A, b, y, or Γ©). The BaseLine property should be equal to the distance from the top edge of the enclosing rectangle to the base line. Therefore, SmallCharsHeight = BaseLine for lowercase letters without ascender/diacritics (like m, e, u). For letters without descenders, BaseLine is equal to the letter height.
On this picture, for the letter o set SmallCharsHeight and BaseLine to the same value equal to the letter height. For the letter Γ½, SmallCharsHeight will be the same as for o, and BaseLine is the distance from the top of the letter rectangle to the base line, as shown.SmallCharsHeight_and_BaseLine

Properties

Methods

TrainingImage Object Diagram

Output parameter

This object is the output parameter of the following methods:

Input parameter

This object is passed as an input parameter to the InsertAt, Add methods of the TrainingImagesCollection object.

See also

TrainingImagesCollection Recognizing with Training (Win) Training User Patterns (Win) Working with Properties