Click or drag to resize
OcrApiSetVariable Method
Set the value of an internal "parameter."

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 1.7.0.341
Syntax
public void SetVariable(
	string name,
	string value,
	bool isDebug = false
)

Parameters

name
Type: SystemString
The name of the parameter
value
Type: SystemString
The value of the parameter
isDebug (Optional)
Type: SystemBoolean
True for debug variable

Return Value

Type: 
False if the name lookup failed.
Remarks

Supply the name of the parameter and the value as a string, just as you would in a config file. Eg SetVariable("tessedit_char_blacklist", "xyz"); to ignore x, y and z. Or SetVariable("classify_bln_numeric_mode", "1"); to set numeric-only mode.

SetVariable may be used before [Overload:Init] Overload, but settings will revert to defaults on Release.

Note Note
Must be called after [Overload:Init] Overload. Only works for non-init variables (init variables should be passed to [Overload:Init] Overload).

For full list of tesseract variables see this article: Tesseract.Net parameters

See Also