Is anyone else using tesseract 4.0alpha from C# ?

On Wednesday, January 10, 2018 at 1:07:28 PM UTC, James Q wrote:
>
> Here is my code:
> string text = "";
>
> string tessDataPath = ConfigurationManager.AppSettings["TessPath"];
> using (var engine = new TessBaseAPI(@tessDataPath, @"eng"))
> {
>     engine.SetVariable("tessedit_ocr_engine_mode", "0");
>     engine.SetPageSegMode(PageSegmentationMode.SINGLE_LINE);
>     engine.SetVariable("tessedit_char_blacklist", type.GetTesseractOptions
> ().Blacklist());
>     engine.SetVariable("tessedit_char_whitelist", type.GetTesseractOptions
> ().Whitelist());
>     engine.Process(imageFileName, false);
>     text = engine.GetUTF8Text();
>
> }
>
> I'm sending images which represent one or a few words on a single line, 
> but in the above code, the SetPageSegMode(..) method has no effect. On the 
> command line I can use:
>     
> tesseract.exe input.png result -l eng --psm 7 --oem 1
>
> on the same images and see clearly better results on psm 7. Does anyone 
> know how to configure this option via the wrapper or is it just not 
> suppported?
>
> Also, blacklists and whitelists are having no effect in the wrapper. 
> Whilst I understand that these are not supported in Tesseract 4 LSTM mode 
> yet, they should still work in 'Tesseract Only' mode right? I know the 
> SetVariable method works (as I see its effect on engine mode). Is there 
> another way of setting blacklists and whitelists through this wrapper?
>
> Thanks
> James 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/bbd58c56-8ba2-414b-b834-6775c1b49565%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to