Android Question B4A OCR Problem on b4a 10

cenyu

Active Member
Licensed User
Longtime User
Hello i trying to create little app that reads automobile plate number...
I make some research into this forum but find only 3 links...And nothing work with b4A 10
I get this link https://www.b4x.com/android/forum/t...th-google-play-services-android-vision.70417/
and download every lib and file from it....also i found that you need all the JAR's and XML's that you can download from this link...
https://www.dropbox.com/s/u8vxiranim5wmii/OCRReaderComplete.zip?dl=0
....to be in your additional library

This is all b4a code
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private Button1 As Button
    Dim avocr As AndroidVisionOCR
 
 
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
 
    Activity.LoadLayout("main")
    avocr.Initialize("")
 
    avocr.OCRtextColor = Colors.Yellow
    avocr.OCRtextSize = 30.0

 
End Sub

Sub Activity_Resume
 

 
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Button1_Click
 
avocr.StartCameraFilter

End Sub




I have installed:
- AndroidVisionOCR ver 1.0
- AppCompat 4.0
- Core 9.90

Also int Aditional Lib's i have this files:

android-support-annotations.jar
android-support-design.jar
android-support-v4.jar
android-support-v7-appcompat.jar
OCRReaderComplete.jar
OCRReaderComplete.xml
play-services-base-9.4.0.jar
play-services-basement-9.4.0.jar
play-services-vision-9.4.0.jar


BUT WHEN I PRESS Button1 to detect text i receive this error:
B4X:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/samples/vision/ocrreader/OcrCaptureActivity;

What is reason of this error and how to correct this?
 

cenyu

Active Member
Licensed User
Longtime User
I try to do something using Erel's link to integrate OCR but no success...i am dummy

I decide to change approach...I found this class [B4X] xOCR Class
And now i can recognize up to 500 cars per day...

May be will be usefull for someone
Thanks again Erel and Blueforcer!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…