Skip to content

OCR

TextThresholdingMethod - CreateTextThresholdingMethod_CreateFromValues

Creates a new TextThresholdingMethod object.

IN

Name Type Description
InAlgorithm Enum < ThresholdingAlgorithm > Thresholding algorithm
InSmoothing Float Value used in Image smoothing. Range: 〔0, +inf).
InShearing Float De-skewing character. Range: 〔0, 1〕.
InDilation Int Dilation value on Y axis. Range: 〔0, +inf).
InHysteresis Float Hysteresis value. Range: 〔0, +inf).
InRadius Int Determines the number of neighboring pixels. Range: 〔1, +inf).
InHysteresisDynamic Float Dynamic hysteresis value. Range: 〔0, +inf).
InAutomaticMethod Enum < ThresholdSelectionMethod > Algorithm to find automatic threshold.
InBlackText Bool Whether to search for black text on a brighter background.
InHysteresisAutomatic Float Automatic hysteresis value. Range: 〔0, +inf).
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutTextThresholdingMethod TextThresholdingMethod The TextThresholdingMethod instance.
Error ErrorState Gets the execution error message

TextSegmentation - CreateTextSegmentation_CreateFromValues

Creates a new TextSegmentation object.

IN

Name Type Description
InSegmentation TextSegmentationMethod Segmentation method.
InThresholding TextThresholdingMethod Thresholding method.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutTextSegmentation TextSegmentation The TextSegmentation instance.
Error ErrorState Gets the execution error message

TextSegmentationMethod - CreateTextSegmentationMethod_CreateFromValues

Creates a new TextSegmentationMethod object.

IN

Name Type Description
InAlgorithm Enum < SegmentationAlgorithm > Segmentation algorithm.
InMinBlobSize Int Minimum blob area. Range: 〔0, +inf).
InMaxBlobSize Int Maximum blob area. Range: 〔-1, +inf).
InCharacterSize Int Characters' width. Range: 〔1, +inf).
InSmoothProjection Float Smoothing value to apply before extracting the characters. Range: 〔0, +inf).
InMaxDistance Float Maximal distance between character parts (closer parts are glued together). Range: 〔0, +inf).
InDistanceBalance Float Ratio between X and Y axis to use when computing distance between regions. Range: 〔0, 1〕.
InSorting Enum < CharacterSortingOrder > Type of sorting.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutTextSegmentationMethod TextSegmentationMethod The TextSegmentationMethod instance.
Error ErrorState Gets the execution error message

OCR - Train_SVM

Trains Support Vector Machines classifier.

IN

Name Type Description
InCharacterSamples CharacterSampleArray Character samples used for training the model.
InNormalizationSize Size Character size after normalization.
InKernel Enum < KernelSVM > Type of kernel.
InCharacterFeatures EnumArray < CharacterFeaturesType > Character features selected.
InC Float Prevents overfitting working as a penalty multiplier for outliers. Range: 〔0, +inf).
InEpsilon Float How much the error could change between the iterations to make the algorithm continue. Range: (-inf, +inf).
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_SVM_Model Trained model.
Error ErrorState Gets the execution error message

Model - GetType

Returns the model type.

IN

Name Type Description
InModel OCR_SVM_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModelArch Enum < ModelArch > Model type.
Error ErrorState Gets the execution error message

Model - IsTrained

Checks if Model has been trained.

IN

Name Type Description
InModel OCR_SVM_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutBool Bool true if model was trained, false otherwise.
Error ErrorState Gets the execution error message

Model - Load

Load internal SVM model.

IN

Name Type Description
InFilename PathFile Filename.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_SVM_Model Model loaded.
Error ErrorState Gets the execution error message

Model - Reset

Reset the model.

IN

Name Type Description
InModel OCR_SVM_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_SVM_Model The modified OCR_SVM_Model
Error ErrorState Gets the execution error message

Model - Save

Save internal model.

IN

Name Type Description
InModel OCR_SVM_Model The input Model
InFilename PathFile Filename.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
Error ErrorState Gets the execution error message

OCR - ExtractText

Extracts and splits character in single characters.

IN

Name Type Description
InImage Image Input image.
InRoi Rectangle2D Where to find text.
InRoiAlignment UCS2D Aligns the ROI to the correct position.
InSegmentationModel TextSegmentation Model used for text segmentation.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutRegion RegionArray Extracted characters (aligned to the ROI).
Error ErrorState Gets the execution error message

OCR - MakeCharacterSamples

Creates an array of character samples, composed by a region and the corresponding character.

IN

Name Type Description
InRegions RegionArray Array of regions.
InCharacters String Corresponding characters.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutCharacterSample CharacterSampleArray Array of CharacterSamples.
Error ErrorState Gets the execution error message

OCR - MakeCharacterSamples_FromFont

Creates an array of character samples, from a known font and a set of characters.

IN

Name Type Description
InFont PathFile Font file (.ttf/.ttc/.otf).
InFontSize Int Character height.
InCharacters String Set of characters to render.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutCharacterSample CharacterSampleArray Array of CharacterSamples.
Error ErrorState Gets the execution error message

OCR - ReadText

Reads text from images using a pre-trained OCR model.

IN

Name Type Description
InCharacters RegionArray Character regions.
InModel OCR_Model Pre-trained OCR model.
InMinScore Float Minimal score for the correct reading of a character. Range: 〔0, 1〕.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutString String Read text.
Error ErrorState Gets the execution error message

OCR - SplitRegionIntoCharacters

Splits the input region into an array of character regions.

IN

Name Type Description
InRegion Region Input region.
InProjectionSmooth Float Smooth value applied to the region projection before splitting. Range: 〔0, +inf).
InCharacterWidth Int Single character width. Range: 〔1, +inf).
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutRegion RegionArray Array single character regions.
Error ErrorState Gets the execution error message

Model - CreateModel_CreateFromType

Creates a new Model object, given a specific model type.

IN

Name Type Description
InType Enum < ModelArch > OCR model type.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_Model The Model instance.
Error ErrorState Gets the execution error message

Model - GetType

Returns the model type.

IN

Name Type Description
InModel OCR_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModelArch Enum < ModelArch > Model type.
Error ErrorState Gets the execution error message

Model - IsTrained

Checks if Model has been trained.

IN

Name Type Description
InModel OCR_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutBool Bool true if model was trained, false otherwise.
Error ErrorState Gets the execution error message

Model - Load

Load internal model.

IN

Name Type Description
InFilename PathFile Filename.
InModelType Enum < ModelArch > Model type to load.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_Model Model loaded.
Error ErrorState Gets the execution error message

Model - Reset

Reset the model.

IN

Name Type Description
InModel OCR_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_Model The modified OCR_Model
Error ErrorState Gets the execution error message

Model - Save

Save internal model.

IN

Name Type Description
InModel OCR_Model The input Model
InFilename PathFile Filename.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
Error ErrorState Gets the execution error message

OCR - Train_MLP

Trains a Multi-Layer Perceptron classifier.

IN

Name Type Description
InCharacterSamples CharacterSampleArray Character samples used for training the model. Characters specified as labels will be interpreted as UTF-16 characters.
InNormalizationSize Size Character size after normalization.
InCharacterFeatures EnumArray < CharacterFeaturesType > Character features selected.
InLearningRate Float Strength of the weight gradient term. Range: 〔0.01, 1〕.
InMomentum Float Strength of the momentum term (the difference between weights on the 2 previous iterations). It provides some inertia to smooth the random fluctuations of the weights. Range: 〔0, 1〕.
InIterationCount Int Maximum number of iterations. Range: 〔1, +inf).
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_MLP_Model Trained model.
Error ErrorState Gets the execution error message

Model - GetType

Returns the model type.

IN

Name Type Description
InModel OCR_MLP_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModelArch Enum < ModelArch > Model type.
Error ErrorState Gets the execution error message

Model - IsTrained

Checks if Model has been trained.

IN

Name Type Description
InModel OCR_MLP_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutBool Bool true if model was trained, false otherwise.
Error ErrorState Gets the execution error message

Model - Load

Load internal MLP model.

IN

Name Type Description
InFilename PathFile Filename.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_MLP_Model Model loaded.
Error ErrorState Gets the execution error message

Model - Reset

Reset the model.

IN

Name Type Description
InModel OCR_MLP_Model The input Model
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutModel OCR_MLP_Model The modified OCR_MLP_Model
Error ErrorState Gets the execution error message

Model - Save

Save internal model.

IN

Name Type Description
InModel OCR_MLP_Model The input Model
InFilename PathFile Filename.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
Error ErrorState Gets the execution error message

CharacterSample - CreateCharacterSample_CreateFromValues

Constructs a new CharacterSample object.

IN

Name Type Description
InCharacter String Character.
InSample Region Sample region.
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutCharacterSample CharacterSample The CharacterSample instance.
Error ErrorState Gets the execution error message

CharacterSample - IsValid

Checks that the CharacterSample object consists of a single character and a non-empty region.

IN

Name Type Description
InCharacterSample CharacterSample The input CharacterSample
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutBool Bool true if the object is valid, false otherwise.
Error ErrorState Gets the execution error message

CharacterSample - GetCharacter

Returns the character string described by the CharacterSample object.

IN

Name Type Description
InCharacterSample CharacterSample The input CharacterSample
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
Outstring String Character.
Error ErrorState Gets the execution error message

CharacterSample - GetSample

Returns the regions inside the CharacterSample object.

IN

Name Type Description
InCharacterSample CharacterSample The input CharacterSample
Name String Set the tool's name
Enable Bool Sets if current tool is enabled or not

OUT

Name Type Description
OutRegion Region Region sample.
Error ErrorState Gets the execution error message