You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem I am facing is that this wrapper supports PNG/JPG only and I'm getting InvalidImage error. I've tried to convert CGImage to UIImage and get the NSData as PNG. I'm not getting an error, but the text is not getting recognised.
How would one approach this situation?
The text was updated successfully, but these errors were encountered:
Are you able to save the converted png/jpeg image byte buffer to file with png/jpeg file extension?
Do the bytes produce correct image
Are the characters clear in this saved image
What kind of words are you trying to recognize? (single word, sentences, single characters)
Page segmentation mode might change the recognized result if you are not looking for sentences
Your example code link
I am quite busy and with a quick look I am not really sure if I understand the code correctly.
Is this the process that is ran for every frame your camera captures? What camera library you are using to get the input?
My thoughts
I would look if the converted NSData can be saved as png/jpeg byte array and then recognized as image path.
If that works problem is probably not a problem with encoding.
It is very hard to say without an example. It would help if you could produce simple example project.
I am very busy for next like 4 weeks and might not be able to help very much. iOS is also a platform that I am not very familiar with and only have emulator with remote connection as my iOS development device. Remote connection causes very bad performance with emulator so live camera will make testing pain.
I will try to help the best I can, but it might not be very much.
You can ask @sivanmg if he is willing to help with iOS technical side. I know better the tesseract side and he knows iOS side.
I've been trying this wrapper and it works perfectly with photos. Now I would like to start a live camera and use tesseract to OCR like the following: https://github.com/yushulx/dotnet-barcode-qr-code-sdk/blob/main/example/maui/Platforms/iOS/CaptureOutput.cs
The problem I am facing is that this wrapper supports PNG/JPG only and I'm getting InvalidImage error. I've tried to convert CGImage to UIImage and get the NSData as PNG. I'm not getting an error, but the text is not getting recognised.
How would one approach this situation?
The text was updated successfully, but these errors were encountered: