Hello,
I need an OCR function and I'm currently using this library (thank you DonManfred).
I have an error (line 10 below)
Advice please
TIA
I need an OCR function and I'm currently using this library (thank you DonManfred).
I have an error (line 10 below)
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
onAuthStateChanged: com.google.firebase.auth.internal.zzl@d47475b
Using Barcode Detector Processor
Error occurred on line: 76 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.ml.vision.barcode.FirebaseVisionBarcodeDetector com.google.firebase.ml.vision.FirebaseVision.getVisionBarcodeDetector()' on a null object reference
at com.google.firebase.samples.mlkit.barcodescanning.BarcodeScanningProcessor.<init>(BarcodeScanningProcessor.java:52)
at de.donmanfred.FirebaseDetectorwrapper.createCameraSource(FirebaseDetectorwrapper.java:479)
at de.donmanfred.FirebaseDetectorwrapper.Initialize(FirebaseDetectorwrapper.java:93)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
B4X:
Activity.LoadLayout("Layout1")
spRegognizers.Clear
spRegognizers.Add(vision.BARCODE_DETECTION)
spRegognizers.Add(vision.TEXT_DETECTION)
spRegognizers.Add(vision.IMAGE_LABEL_DETECTION)
spRegognizers.Add(vision.FACE_DETECTION)
spRegognizers.Add(vision.FACE_CONTOUR)
'spRegognizers.Add(detector.CLASSIFICATION_FLOAT) ' Does not work
'spRegognizers.Add(detector.CLASSIFICATION_QUANT) ' Does not work
detector.Initialize("MLVision",CameraSourcePreview1,GraphicOverlay1,File.Combine(File.DirAssets,"clown_nose.png"),vision.BARCODE_DETECTION)
detector.Facing = 0
Advice please
TIA