ResetParameters Method (GdPictureOCR)
In This Topic
Resets all parameters of the current GdPictureOCR object to their default values, including added languages, custom dictionaries and internal engine variables.
This does not apply to OCR results used in the current object.
Syntax
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
Example
How to reset all internal variables.
Using gdpictureOCR As GdPictureOCR = New GdPictureOCR()
'Set some GdPictureOCR variables.
gdpictureOCR.Context = OCRContext.OCRContextRawLine
gdpictureOCR.CharacterSet = ",./<>?"
gdpictureOCR.Timeout = 1000
'Some some Tesseract variables.
gdpictureOCR.SetVariable("chop_enable", "T")
gdpictureOCR.SetVariable("use_new_state_cost", "F")
gdpictureOCR.SetVariable("enable_new_segsearch", "0")
gdpictureOCR.SetVariable("edges_max_children_per_outline", "40")
'Reset all internal variables to their default values.
gdpictureOCR.ResetParameters()
End Using
using (GdPictureOCR gdpictureOCR = new GdPictureOCR())
{
//Set some GdPictureOCR variables.
gdpictureOCR.Context = OCRContext.OCRContextRawLine;
gdpictureOCR.CharacterSet = ",./<>?";
gdpictureOCR.Timeout = 1000;
//Set some Tesseract variables.
gdpictureOCR.SetVariable("chop_enable", "T");
gdpictureOCR.SetVariable("use_new_state_cost", "F");
gdpictureOCR.SetVariable("enable_new_segsearch", "0");
gdpictureOCR.SetVariable("textord_force_make_prop_words", "F");
gdpictureOCR.SetVariable("edges_max_children_per_outline", "40");
//Reset all internal variables to their default values.
gdpictureOCR.ResetParameters();
}
Example
How to reset all internal variables.
Using gdpictureOCR As GdPictureOCR = New GdPictureOCR()
'Set some GdPictureOCR variables.
gdpictureOCR.Context = OCRContext.OCRContextRawLine
gdpictureOCR.CharacterSet = ",./<>?"
gdpictureOCR.Timeout = 1000
'Some some Tesseract variables.
gdpictureOCR.SetVariable("chop_enable", "T")
gdpictureOCR.SetVariable("use_new_state_cost", "F")
gdpictureOCR.SetVariable("enable_new_segsearch", "0")
gdpictureOCR.SetVariable("edges_max_children_per_outline", "40")
'Reset all internal variables to their default values.
gdpictureOCR.ResetParameters()
End Using
using (GdPictureOCR gdpictureOCR = new GdPictureOCR())
{
//Set some GdPictureOCR variables.
gdpictureOCR.Context = OCRContext.OCRContextRawLine;
gdpictureOCR.CharacterSet = ",./<>?";
gdpictureOCR.Timeout = 1000;
//Set some Tesseract variables.
gdpictureOCR.SetVariable("chop_enable", "T");
gdpictureOCR.SetVariable("use_new_state_cost", "F");
gdpictureOCR.SetVariable("enable_new_segsearch", "0");
gdpictureOCR.SetVariable("textord_force_make_prop_words", "F");
gdpictureOCR.SetVariable("edges_max_children_per_outline", "40");
//Reset all internal variables to their default values.
gdpictureOCR.ResetParameters();
}
See Also