henrivain / TesseractOcrMaui

Tesseract wrapper for Windows, Android and iOS for .NET MAUI
Apache License 2.0
37 stars 4 forks source link

Tesseract engine mode access #22

Closed henrivain closed 9 months ago

henrivain commented 9 months ago

Hi @henrivain I think its great you started working on this iOS-branch - My project is for Android and later on for iPhone. I have tried using the Tesseract-nuget (Not yours) and it work fine for my project but it only works in Windows. For my project i found that running Tesseract with enginemode: EngineMode.TesseractOnly was better than default and Lstm. Is it possible to add EngineMode (TesseractOnly, LstmOnly, TesseractAndLstm and Default)to your tesseractOcrMaui.EngineConfiguration? Regards

Originally posted by @ThomasMunch in https://github.com/henrivain/TesseractOcrMaui/issues/11#issuecomment-1857835111

henrivain commented 9 months ago

Yes, It seems to possible. I do the changes as soon as I can. It will probably take at least little over a week until I can roll up new version of nuget.

List of required changes:

ITessEngineConfigurable add new property

EngineMode DefaultEngineMode { get; set; } 

Add new EngineMode and add int values

public enum EngineMode
{
    NotSet = -1,
    TesseractOnly = 0,
    LstmOnly = 1,
    TesseractAndLstm = 2,
    Default = 3
}

TessEngine changes

What comes to IOS support

I am currently working with someone that has gotten ios library working. We still have some technical difficulties that we need to solve. I don't promise anything, but I think we can get it working.