Thanks for the reply, i just want to elaborate what i am actually doing will give you a clean picture for a proper guidance!!!
I am using tesseract dll in windows and i am using the below code for engine and page segment mode....
private static TesseractEngine _engine;
private static TesseractEngine Engine
{
get
{
if (_engine == null || _engine.IsDisposed)
{
try
{
_engine = new TesseractEngine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\tessdata", "eng", EngineMode.LstmOnly);
}
catch (Exception ex)
{
ex.Message.ToString();
}
}
return _engine;
}
}
then later i am initializing this engine for reading the text from image:
private string LiftText(Bitmap img)
{
string resultText = string.Empty;
try
{
TesseractEngine engine = new TesseractEngine("./tessdata", "eng", EngineMode.LstmOnly);
Tesseract.Page mypage = engine.Process(img, PageSegMode.SparseText);
resultText = mypage.GetText();
mypage.Dispose();
engine.Dispose();
}
catch (Exception ex)
{
Exceptioninfo("LiftText()", ex.StackTrace);
}
return resultText;
}