OcrConfig class
Configuration for general OCR scanning use-cases
Constructors
-
OcrConfig({int? charCountX, int? charCountY, double? charPaddingXFactor, double? charPaddingYFactor, String? charWhitelist, String? customCmdFile, int? maxCharHeight, int? minCharHeight, int? minConfidence, int? minSharpness, List<
String> ? models, OcrConfigScanMode? scanMode, String? validationRegex}) -
OcrConfig.fromJson(Map<
String, dynamic> json) -
factory
- OcrConfig.fromRawJson(String str)
-
factory
Properties
- charCountX ↔ int?
-
Sets the number of characters in each text line for 'grid' mode.
getter/setter pair
- charCountY ↔ int?
-
Sets the number of text lines for 'grid' mode.
getter/setter pair
- charPaddingXFactor ↔ double?
-
Defines the average horizontal distance between two characters in 'grid' mode, measured
in percentage of the characters width.
getter/setter pair
- charPaddingYFactor ↔ double?
-
Defines the average vertical distance between two characters in 'grid' mode, measured in
percentage of the characters height.
getter/setter pair
- charWhitelist ↔ String?
-
Restricts the scanner to a set of characters to be detected.
getter/setter pair
- customCmdFile ↔ String?
-
Sets a custom Anyline script. The file has to be located in the project and point to a
path relative from the project root. Please check the official documentation for more
details.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxCharHeight ↔ int?
-
Sets a maximum character height (in pixels) to be considered in the scanning process.
getter/setter pair
- minCharHeight ↔ int?
-
Sets a minimum character height (in pixels) to be considered in the scanning process.
getter/setter pair
- minConfidence ↔ int?
-
Sets a minimum confidence which has to be reached in order to trigger a scan result.
getter/setter pair
- minSharpness ↔ int?
-
Sets a sharpnes factor (0-100) to rule out blurry images.
getter/setter pair
-
models
↔ List<
String> ? -
Sets one or more custom Anyline models. The files have to be located in the project and
point to a path relative from the project root. If no customCmdFile is set, only a
maximum of one model is valid. If a customCmdFile is set, it depends whether or not the
customCmdFile requires multiple models or not. Please check the official documentation
for more details.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scanMode ↔ OcrConfigScanMode?
-
Sets whether to scan single-line texts, multi-line texts in a grid-formation or finds
text automatically.
getter/setter pair
- validationRegex ↔ String?
-
Sets a regular expression which the scanned text needs to match in order to trigger a
scan result.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toRawJson(
) → String -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited