You are here: Start » AVL.NET » AVL.RecognizeCharacters_SVM_Deprecated(AvlNet.Region[], AvlNet.OcrSvmModel, AvlNet.Size?, bool, AvlNet.CharacterSortingOrder, float?, int?, string, float[], AvlNet.OcrCandidate[][], AvlNet.Image[], AvlNet.Box[])

AVL.RecognizeCharacters_SVM_Deprecated(AvlNet.Region[], AvlNet.OcrSvmModel, AvlNet.Size?, bool, AvlNet.CharacterSortingOrder, float?, int?, string, float[], AvlNet.OcrCandidate[][], AvlNet.Image[], AvlNet.Box[])

Classifies input regions into characters. Based on the Support Vector Machines model.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RecognizeCharacters_SVM_Deprecated(
	AvlNet.Region[] inCharacterRegions,
	AvlNet.OcrSvmModel inOcrModel,
	AvlNet.Size? inCharacterSize,
	bool inDotPrint,
	AvlNet.CharacterSortingOrder inCharacterSorting,
	float? inMinScore,
	int? inMinSpaceWidth,
	out string outCharacters,
	out float[] outScores,
	out AvlNet.OcrCandidate[][] outCandidates,
	out AvlNet.Image[] diagNormalizedCharacters,
	out AvlNet.Box[] diagCharactersBoxes
)

Parameters

inCharacterRegions
Type: AvlNet.Region
Array of character regions to recognize
inOcrModel
Type: AvlNet.OcrSvmModel
Trained OcrSvmModel used to recognize characters
inCharacterSize
Type: System.Nullable<AvlNet.Size>
Size of single monospaced character if needed, or null.
inDotPrint
Type: System.Boolean
Dot-printed characters preprocessing
inCharacterSorting
Type: AvlNet.CharacterSortingOrder
Sorting order of input characters
inMinScore
Type: System.Nullable<System.Single>
Minimal value of accepted result. Otherwise char '*' will be placed, or null.
inMinSpaceWidth
Type: System.Nullable<System.Int32>
Minimal distance between characters where space character will be inserted, or null.
outCharacters
Type: System.String
Result of characters recognition
outScores
Type: System.Single
Classification result score
outCandidates
Type: AvlNet.OcrCandidate
Array of a character classification results and their score
diagNormalizedCharacters
Type: AvlNet.Image
Images of normalized characters used in character recognition
diagCharactersBoxes
Type: AvlNet.Box
Bounding boxes of characters

Description

The operation recognizes characters from given regions using prepared OcrSvmModel.

This operation requires trained SVM classifier provided in the inOcrModel input. For further details about creating and learning fonts please refer to the documentation of filters InitOcr_SVM_Deprecated and TrainOcr_SVM_Deprecated.

Filter requires regions specified in the inCharacterRegions. Each of the input region must contain single character. To separate characters in the region use SplitRegionIntoExactlyNCharacters or SplitRegionIntoMultipleCharacters.

The inCharacterSorting parameter defines the sorting order of the input characters provided in inCharacterRegions.

The parameter inDotPrint turns on the dedicated smoothing for characters printed using jet printer in dot-matrix form.

The parameter inCharacterSize defines size of monospaced (fixed-width) font. If the parameter is set to auto character will be recognized as proportional font. For further information about font types please refer to the documentation of filter TrainOcr_SVM.

The input inMinSpaceWidth value indicates minimal distance between characters where space character will be inserted to result string. When the value is marked as auto no spaces will be inserted.

The output outCharacters contains recognized characters. The recognition score of each recognized character is stored in the outScores.

Remarks

To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition

Errors

Error type Description
DomainError Invalid OcrSvmModel in RecognizeCharacters_SVM.
DomainError Uninitialized OcrSvmModel in RecognizeCharacters_SVM

See also