Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tesseract engine mode access #22

Closed
henrivain opened this issue Dec 15, 2023 · 1 comment
Closed

Tesseract engine mode access #22

henrivain opened this issue Dec 15, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@henrivain
Copy link
Owner

henrivain commented Dec 15, 2023

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 #11 (comment)

@henrivain henrivain added the enhancement New feature or request label Dec 15, 2023
@henrivain
Copy link
Owner Author

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

  • Set ctors to have "EngineMode mode = EngineMode.NotSet"
  • Add check to be run before tesseract API initializer
if (mode is EngineMode.NotSet)
{
    mode = DefaultEngineMode;
}

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.

@henrivain henrivain self-assigned this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant