Skip to main content

ScanResult

Namespace: Wisej.Ext.Tesseract

Assembly: Wisej.Ext.Tesseract (4.1.0.0)

Contains information about the text detected from the image

public class ScanResult

Constructors​

Instance member ScanResult(confidence, text, words)​

Creates a new instance of ScanResult with the given configuration.

NameTypeDescription
confidenceInt32The confidence of the recognition. Generally a higher confidence indicates that the result is more accurate.
textStringThe text discovered.
wordsString[]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​

Instance member Confidence​

Int32: Returns the confidence level of the scan event.

Generally a higher confidence indicates that the result is more accurate.

Instance member Text​

String: Returns the text detected during the scan event.

Instance member Words​

String[]: Returns a list of words that were detected during the scan event.