[Simple OCR] Simple OCR on mobile

[Simple OCR] Simple OCR on mobile

  
Forge Component
(0)
Published on 28 Mar by Takasi Moriya
0 votes
Published on 28 Mar by Takasi Moriya

Can this module be used on mobile?

Thank you for having interest.

Simple OCR extension is only able to run as server side action.
So, if your mobile app called to a server side action and the action used Simple OCR, your mobile app could use the text from OCR. Of course, the mobile device must be online when doing it.

Takasi Moriya wrote:

Thank you for having interest.

Simple OCR extension is only able to run as server side action.
So, if your mobile app called to a server side action and the action used Simple OCR, your mobile app could use the text from OCR. Of course, the mobile device must be online when doing it.

I saw the extension you have created. The image path seems to be only Windows locations. Will it be able to handle a image path from mobile?

If so, then integration will be simple.

Thank you for your time. :)


Mobile client's screen action can pass its binary variable to a server action's argument. And the server action can save it into server's file.  I hope the following screenshot will help you.

Takasi Moriya wrote:

Mobile client's screen action can pass its binary variable to a server action's argument. And the server action can save it into server's file.  I hope the following screenshot will help you.

Hi Takasi.

Thank you so much for the response. I will try it out. :)

Regards,

Saurav Sircar


Takasi Moriya wrote:

Mobile client's screen action can pass its binary variable to a server action's argument. And the server action can save it into server's file.  I hope the following screenshot will help you.

Hi Takasi.

I tried implementing your method for mobile, but it doesn't seem to be working. I keep getting the error "Access to <path> denied", thrown by the Filesystem Extension. Is it possible for you to share the OML file?

Regards,

Saurav Sircar


I released version 2 of the extension today.
https://www.outsystems.com/forge/3086/simple-ocr/
The new version has a new action which can treat image file binary instead of image file path. 

Mobile sample using the new action was also released onto Forge.
https://www.outsystems.com/forge/component/3501/simple-ocr-sample-mobile/


Takasi Moriya wrote:

I released version 2 of the extension today.
https://www.outsystems.com/forge/3086/simple-ocr/
The new version has a new action which can treat image file binary instead of image file path. 

Mobile sample using the new action was also released onto Forge.
https://www.outsystems.com/forge/component/3501/simple-ocr-sample-mobile/


Hi Takasi,

I tried the Sample mobile application. But I keep getting the following error:

Unable to load DLL 'pvt.cppan.demo.google.tesseract.libtesseract400.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I'm not able to understand how to input the trained data into the module. I've added the DataPath variable for the module, which contains the trained data, as you've mentioned in the documentation of the web version of the module. But it still gives me the error.

Should I add the trained data as a resource somehow?

Regards,

Saurav Sircar


Hi Takasi,

I have de same problem "Unable to load DLL 'pvt.cppan.demo.google.tesseract.libtesseract400.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

Regards,

Lopes Miguel

Sorry for wasting your time, Saurav.
I will investigate it tomorrow or later and get back.

Thank you Takasi. :)

Hello!

I tried it for identifying numbers, but it didn't worked. It will ever be possible or it's only for alphabet?

Cheers!

Diogo

Hello Saurav, Hello Lopes,

I've investigated your problem, and just released new version of both extension and sample.
Please check the new version.

https://www.outsystems.com/forge/3086/simple-ocr/
https://www.outsystems.com/forge/component/3500/simple-ocr-sample/
https://www.outsystems.com/forge/component/3501/simple-ocr-sample-mobile/

Thank you for your inconvenience.

Saurav Sircar wrote:

I'm not able to understand how to input the trained data into the module. I've added the DataPath variable for the module, which contains the trained data, as you've mentioned in the documentation of the web version of the module. But it still gives me the error.

In mobile application, file extensions of any resource files with 'Deploy Action' property seems to have to be registered on to MIME settings of IIS.  As a workaround, we can use "bin2\hidden_resources" directory.  Please see a following thread.
https://www.outsystems.com/forums/discussion/34717/mobile-apps-resource-file-with-a-non-standard-extension/#Post122726

Should I add the trained data as a resource somehow?

'Simple OCR Sample Mobile' can be used without any more additional trained data files.

Best regards.

Takasi Moriya wrote:

Saurav Sircar wrote:

I'm not able to understand how to input the trained data into the module. I've added the DataPath variable for the module, which contains the trained data, as you've mentioned in the documentation of the web version of the module. But it still gives me the error.

In mobile application, file extensions of any resource files with 'Deploy Action' property seems to have to be registered on to MIME settings of IIS.  As a workaround, we can use "bin2\hidden_resources" directory.  Please see a following thread.
https://www.outsystems.com/forums/discussion/34717/mobile-apps-resource-file-with-a-non-standard-extension/#Post122726

Should I add the trained data as a resource somehow?

'Simple OCR Sample Mobile' can be used without any more additional trained data files.

Best regards.

Hi Takasi.

The application is working out great. Thank you so much. :)

I had another query. If I need to add support for other languages, how would I do so?

Regards,

Saurav Sircar.


Diogo Mendes wrote:

I tried it for identifying numbers, but it didn't worked. It will ever be possible or it's only for alphabet?

Hello Diogo,

I was able to use the sample above for recognizing numbers. See the screenshot below.
It's depends on conditions of image, the font style which were used for building trained data and compatibility between trained data and your image.

Unfortunately, I can't give you any information about these tesseract's issues.
Please refer tesseract's site.
https://github.com/tesseract-ocr/tesseract/wiki

Saurav Sircar wrote:

The application is working out great. Thank you so much. :)

I had another query. If I need to add support for other languages, how would I do so?

Hello Saurav,

It's good that you succeeded to run the module. Thank you.

I have added descriptions about appending languages to the sample modules detail page.
https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=3501

If you have any other question about the sample module, please create a new post into the support page of the sample module.
https://www.outsystems.com/forge/component-discussions/3501/Simple+OCR+Sample+Mobile