create_ocr_net ( : : WidthPattern, HeightPattern, Interpolation, Features, HiddenLayer, Init, Character : NetId )

Creating a new OCR-network.

The operator create_ocr_net creates a new OCR network. This network must then be trained with the help of the operator traind_ocr_net.

The parameters WidthPattern and HeightPattern indicate the size of the inputlayer of the network. This size is used for the features 'projection_horizontal', 'projection_vertical' and 'pixel'. The bigger it is, the more characters can be distinguished. Hereby the amount of time necessary for the training (as well as the number of training random samples) and the time necessary for the recognition, however, will increase as well. The larger the input level, the more specifical the training is for a certain font. The parameter Interpolation indicates the interpolation mode concerning the adaptation of characters in the image to the network. For more detailed information on this parameter see also image_transform__.

The parameter Character determines all the characters which have to be recognized. Normally the transmitted strings consist of one character (e.g. alphabet). But also strings of any length can be learned. The number of distinguishable characters (number of strings in Character) is limited to 2048.

The parameter Features helps to chose additional features besides grayvalues in order to recognize characters. By using 'default' the ususal features will be set.

The following features are available:

  'ratio'
      Ratio of the character.

  'width' 
      Width of the character (not invariant to scaling).

  'height'
      Height of the character (not invariant to scaling).

  'zoom_factor' 
      Difference in size between the current character and the
      values of WidthPattern and HeightPattern
      (not invariant to scaling).

  \item['foreground']
      Relative share of pixels in the foreground. 

  'anisometry'
      Form feature anisometry.

  'compactness']
      Form feature compactness.

  'convexity'
      Form feature convexity.

  'moments'
      Normed geometric moments of the region.    

  'phi'
      Orientation (angle) of the character.

  'num_connect'
      Number of connecting components. 

  'num_holes'
      Number of holes.

  'projection_horizontal'
      Horizontal projection of the grayvalues.

  'projection_vertical'
      Vertical projection grayvalues.

  'cooc'
      Values of the binary cooccurrence matrix.

  'grey_moments']
      Normed grayvalue moments and the angles of the grayvalue level. 

  'num_chord'
      Number of chords in the region normed to the area. 

  'chord_histo'
      Frequency of the chords per row. 

  'pixel'
      Grayvalue of the character. 
The parameter HiddenLayer determines the number of the hidden layers of the feed forward network. The parameter Init determines the presetting of the network nodes.

The following initializations are available:

  'null' 
      All nodes will be set to 0.

  'random' 
      All nodes will be set to randomly chosen and equally distributed
      values.  


Parameters

WidthPattern (input_control)
integer -> integer
Width of the input layer of the network.
Default value: 8
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20
Range of values: 1 <= WidthPattern <= 100

HeightPattern (input_control)
integer -> integer
Height of the input layer of the network.
Default value: 10
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20
Range of values: 1 <= HeightPattern <= 100

Interpolation (input_control)
integer -> integer
Interpolation mode concerning the zooming from the image to the network.
Default value: 0
List of values: 0, 1, 2

Features (input_control)
string -> string
Additional features.
Default value: 'default'
List of values: 'default', 'zoom_factor', 'ratio', 'width', 'height', 'foreground', 'anisometry', 'compactness', 'convexity', 'moments', 'phi', 'num_connect', 'num_holes', 'projection_horizontal', 'projection_vertical', 'chord_histo', 'num_chord', 'pixel', 'cooc', 'grey_moments'

HiddenLayer (input_control)
integer-array -> integer
Number of hidden layers of the feed forward network.
Default value: 2
List of values: 1, 2, 3

Init (input_control)
string-array -> string
Kind of the network initialization.
Default value: 'random'
List of values: 'null', 'random'

Character (input_control)
string-array -> string
All characters of a set.
Default value: '['a','b','c']'

NetId (output_control)
integer -> integer
ID of the created OCR-network.
Default value: 'integer'


Result

If the parameters are correct, the operator create_ocr_net returns the value TRUE. Otherwise an exception will be raised.


Possible Predecessors

init_horus


Possible Successors

traind_ocr_net, trainf_ocr_net, info_ocr_net, write_ocr_net, ocr_change_character


See also

image_transform__, ocr_change_character



Copyright © 1996-1997 MVTec Software GmbH