DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

25 Oct 2017, 15:47

DesignSpark AR app - OCR module for Unity

The DesignSpark AR app has broken new ground both in making RS Components the first international distributor to provide the majority of their product catalogue as 3D models in Augmented Reality, AND to provide the first of its kind integration of Google's Tesseract OCR engine into a Unity (C#) project.

 

 

 

 

 

 

Unity mobile developers can now import this wrapper as a package into their C# project and build-in accurate optical text recognition, courtesy of Google's open source Tesseract OCR engine. Help documentation to import a Unity package is available here: https://docs.unity3d.com/Manual/AssetPackages.html

Read more about the DesignSpark AR app development journey here: https://www.rs-online.com/designspark/the-technical-challenges-involved-in-creating-the-rs-ar-application

Apply here to test the DesignSpark AR app: https://www.rs-online.com/designspark/test-drive-the-designspark-ar-app-iosandroid

 

DOWNLOAD Unity wrapper for Google Tesseract

Become a DesignSpark member or Login now to complete the form and get the download link to the Unity package.

A curious mind with a passion for 3D CAD & rapid prototyping.

25 Oct 2017, 15:47

Comments

Joy Ch

April 12, 2018 14:16

Hi all,

Make sure to choose the right target platform 'Android/iOS' in File > Build Settings. This is to enable the platform dependent compilation in Unity.

Next, here are a couple steps to demo the plugin on Android (courtesy of user 'gtzpower' on the Unity forum):

1. Set Android as your build target
2. Import the Unity wrapper which is downloadable from the above article.
3. Next, import this package: https://forum.unity.com/attachments/tesseractocrdemo-unitypackage.268654/
4. Build and run the Demo scene to your Android device (it does not work in the Unity editor)

The "TestImage.jpg" is passed into Tesseract and should have it's text printed on the screen.

Further help can be sought on the Unity AR/VR forums: https://forum.unity.com/threads/unity-wrapper-google-tesseract-ocr.505134/

0 Votes
joxevc

April 12, 2018 07:48

I have the same problem with "libtess.so" as Deathpyre @N1ck @Deathpy reshamain, any help is wellcome

0 Votes
TalhaDX

March 20, 2018 07:57

Hi, I want to read simple math equations with numbers and operators. Bit i want to read them from camera. How can i achieve this plugin?

I have passed this image in Demo script and it is working fine. I need to read from camera. Please help me with that.

0 Votes
joxevc

April 12, 2018 07:48

@TalhaDX Can you please share your working project? I can't even manage to have a working demo. thank you

joxevc

April 12, 2018 07:34

@TalhaDX Hi, can you please share your project? I just get the demo script working. I get an error loading "libtess.so".

lupustom

March 6, 2018 08:52

When I export my app for iOS and try to run it on an iOS device, the build fails with an Apple Match-O Linker (id) Error. Lots of undefined symbols in TesseractOCR apparently - any ideas why that might be? I am using a very simple setup where I just constantly update a string to use Tesseract with my camera texture ...

0 Votes
Deathpyre

March 5, 2018 09:04

Im not sure what my issue is... I try to run TesseractWrapper.Init and it gets an error of just "libtess.so" which makes the handle null. Anyone have an idea?

N1ck

March 6, 2018 09:06

I'm having this issue too. After digging around in the VS dubugger, Init() fails with a message of "libtess.so". I will be digging deeper and will post any updates.

amu365

April 3, 2018 08:00

@N1ck @Deathpyre did you guys come up with a fix for this. im having the same error

gtzpower

March 2, 2018 09:06

For those getting the 'tesseractClass' does not exist error, you will likely notice that tesseractClass is declared at the top of the file ONLY for iOS and Android. Make sure your target platform is set to one of those 2 in your build settings.

N1ck

March 5, 2018 09:19

@gtzpower Just came here to say this, but it looks like you beat me to it :). I ended up copy/pasting the statement in the #elif in the class declaration just to quiet the console error until I switched build platforms.

hv4vault

February 27, 2018 08:32

I am also getting the same issue as @alok100 mentioned. Cannot understand why it is happening. Any lead will be appreciable. Thanks in advance.

hv4vault

March 2, 2018 09:05

Found how to solve the issue. In the build settings, switch to Android/iOS. Then the error will be gone.

Joy Ch

February 9, 2018 16:15

Hi 'alok100', see line 49 of your code. This is where the problem lies, the compiler is not able to find a function with the name 'tesseractClass'. Take a look at how you defined the function initially, as they are case sensitive. Maybe, it's 'TesseractClass'? I'd suggest posting queries like these directly on the Unity forums, where there is a larger developer community available to help: https://forum.unity.com/forums/ar-vr-xr-discussion.80/

@shamain: I'll be looking into the issue you've reported next.

0 Votes
alok100

February 9, 2018 08:57

getting error Assets/tesseract/TesseractWrapper.cs(49,10): error CS0103: The name `tesseractClass' does not exist in the current context

0 Votes
shamain

January 31, 2018 09:08

Hi There,
First big thanks for the ocr plugin. When i import the package to unity and built a sample android app i see "unable to load libtess.so" message in log and no detected text. What would be the issue here ?.

0 Votes
brighamnoble

January 10, 2018 11:38

Great article Joy! Looking forward to seeing the advances in the app in the future.

0 Votes