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: 4.6.411
Syntax
public void SetVariable(
	string name,
	string value,
	bool isDebug = false
)

Parameters

name  String
The name of the parameter
value  String
The value of the parameter
isDebug  Boolean  (Optional)
True for debug variable

Return Value

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 Init, but settings will revert to defaults on Release.

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

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

See Also