ScanResult
Namespace: Wisej.Ext.Tesseract
Assembly: Wisej.Ext.Tesseract (4.1.0.0)
Contains information about the text detected from the image
- C#
- VB.NET
public class ScanResult
Public Class ScanResult
Constructors
ScanResult(confidence, text, words)
Creates a new instance of ScanResult with the given configuration.
| Name | Type | Description |
|---|---|---|
| confidence | Int32 | The confidence of the recognition. Generally a higher confidence indicates that the result is more accurate. |
| text | String | The text discovered. |
| words | String[] | An array of strings containing the words discovered. |
Example:
// ScanResult instances are normally returned by Tesseract.ScanImageAsync,
// but they can also be created directly, for example in unit tests.
var result = new ScanResult(92, "Hello World", new[] { "Hello", "World" });
if (result.Confidence >= 80)
AlertBox.Show($"Found {result.Words.Length} words: {result.Text}");
Properties
Confidence
Int32: Returns the confidence level of the scan event.
Generally a higher confidence indicates that the result is more accurate.
Text
String: Returns the text detected during the scan event.
Words
String[]: Returns a list of words that were detected during the scan event.