OCR.Space extension

This worked for me on Android 10 and 13 with companion app

filePath:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/ctiImage.jpg

Note: slash at beginning of saveAs filename, full path given for objectLocation, and fileType = JPG not jpg

I had already tried both JPG and jpg.
Looks like the path may be the issue, ill try later and update on results.

Is these extension support marathi language?

Check if the language is listed here.

Hi @gopal_gopal
I searched on Free OCR API and on language I did not find reference to marathi language.
But if You use ocrEngine 3 with OCRFromFile You can use:
Hindi = hin
Kannada = kan
Telugu = tel
Tamil = tam
I hope this can be useful this for You?
Best Regards
Marco

1 Like

I already read ocr space docs, but Thank you for spending time to reply me :hugs:.

Hi Marco,
I'm trying to use your extension for receipt recognition and it works!
But unfortunately you didn't include in the OCRFromFile call two important parameters that are present in the OCR API and could drastically improve the OCR quality: IsTable and DetectOrientation.
Is it possible to add these parameters?
Thank you
Alex

Hi Alexandre,
in the next few days I will check and try to add these parameters.
Best Regards
Marco

Grazie mille Marco!

Ciao a tutti,

ocrFromFile
I added two parameters

isTable can be true or false
detectOrientation can be true or false

OCRAPI here You can find when to use it

OCRSpace.aix (18.3 KB)
OCR.aia (23.6 KB)

Best Regards
Marco Perrone

2 Likes

6 posts were split to a new topic: Send OCR output to TextToSpeech?

Hello thanks for the extension but when i am testing my app on my phone it is not working. When i take a picture it just shows me the image it does not give any text. If you can help please do. Can you do it fast pls i need it for my project and we dont have a lot of time.

Hi @Hikari did You follow the instruction at the beginning.
Register to have your api key, and then add your api key in the OCRKey variable in the project
I think this is your problem.
Best Regards
Marco

$r = $client->request('POST', 'http://api.ocr.space/parse/image',[
'headers' => ['apiKey' => 'KEY', 'OCREngine'=> 2 ],
'multipart' => [
[
'name' => 'file',
'contents' => $fileData

        ]
    ]
], ['file' => $fileData],  ['OCREngine'=> 4 ] );
$response =  json_decode($r->getBody(),true);

Please help me to put correctly OCREngine

Does anyone use the paid API?
I'm testing the extension using free API. The extension seems to work fine, but the free API is unavailable all the time. Does the paid version have the same problem?

Starting today with app inventor, just imported the ocr.space extension but what should I put for the first block: "For component"?

you are using 'any component', try use a specific one.
image

drag blocks from 1, not 2

1 Like

Ciao @Sergio_Arrais,
download the sample project for the ocr extension

and import the project in your app inventor so You have a complete project where to study.
Marco

1 Like

thank you very much!

thank you