logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
chirag.doshi  
#1 Posted : Friday, March 18, 2022 11:04:30 AM(UTC)
chirag.doshi

Rank: Newbie

Groups: Registered
Joined: 3/18/2022(UTC)
Posts: 3
United States
Location: Weston,FL

Please see this code snippet:

using (var api = OcrApi.Create())
{
Thread.Sleep(2000);
(Languages language, string path) = GetLanguageDir(lang);

string[] variables = {"classify_enable_adaptive_debugger"};
string[] values = {"1"};

api.Init(language, path, Patagames.Ocr.Enums.OcrEngineMode.OEM_DEFAULT, varsVec:variables,varsValues:values);
Thread.Sleep(2000);

api.OutputName = Path.Combine(Path.GetDirectoryName(testBitmap),$"{Path.GetFileNameWithoutExtension(testBitmap)}_EngineData");
api.InputFilters.Add(new Patagames.Ocr.InputFilters.OcrInflate(OCRData.scaleFactor));
api.InputFilters.Add(new Patagames.Ocr.InputFilters.OcrBinarize(BinMode.Adaptive));
plainText = api.GetTextFromImage(testBitmap);
System.Threading.Thread.Sleep(2000);
}

-I am trying to binarize the input image using adaptive filter and scale by inflate filter.
I have enabled debugging but I do not see any images in the path name api.Outputname file or folder.
Please advise on how to use the InputFilters and enable debugging to dump the files to a filter.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.