OCR, FaceRecognition, BarcodeScanner using Google Vision

DonManfred

Expert
Licensed User
Longtime User
This is a wrap for this github project.

It is basically the same as the one posted by @Johan Schoeman plus facerecognition and Barcodescanner (as of now it is configigured to scan all know formats.)


MobileVision

Author:
Version: 1.51
  • BarcodeDetector
    • Events:
      • onBarcodeResult (success As Boolean, info As String, result As List)
      • Result (info As String, scanresults As List)
    • Functions:
      • decodeBitmapUri (ctx As android.content.Context, uri As android.net.Uri) As android.graphics.Bitmap
      • detect (frame As com.google.android.gms.vision.Frame)
      • Initialize (EventName As String)
      • launchMediaScanIntent
      • receiveFrame (frame As com.google.android.gms.vision.Frame)
      • release
      • scanBitmap (b As android.graphics.Bitmap)
      • setFocus (focus As Int) As Boolean
      • takePicture
    • Properties:
      • isOperational As Boolean [read only]
  • FaceDetector
    • Events:
      • onFaceDetectResult (success As Boolean, result As String)
      • Result (info As String, scanresults As List)
    • Functions:
      • decodeBitmapUri (ctx As android.content.Context, uri As android.net.Uri) As android.graphics.Bitmap
      • detect (frame As com.google.android.gms.vision.Frame)
      • Initialize (EventName As String)
      • launchMediaScanIntent
      • receiveFrame (frame As com.google.android.gms.vision.Frame)
      • release
      • scanBitmap (b As android.graphics.Bitmap)
      • setFocus (focus As Int) As Boolean
      • takePicture
    • Properties:
      • isOperational As Boolean [read only]
  • TextRecognizer
    • Events:
      • onOCRScanResult (success As Boolean, result As String)
      • Result (info As String, blocks As String, lines As String, words As String, scanresults As List)
    • Functions:
      • decodeBitmapUri (ctx As android.content.Context, uri As android.net.Uri) As android.graphics.Bitmap
      • detect (frame As com.google.android.gms.vision.Frame)
      • Initialize (EventName As String)
      • launchMediaScanIntent
      • receiveFrame (frame As com.google.android.gms.vision.Frame)
      • release
      • scanBitmap (b As android.graphics.Bitmap)
      • setFocus (focus As Int) As Boolean
      • takePicture
    • Properties:
      • isOperational As Boolean [read only]
      • Processor As com.google.android.gms.vision.Detector.Processor [write only]
 

Attachments

  • MobileVisionEx.zip
    8.3 KB · Views: 1,290
  • MobileVisionV1.24.zip
    17.7 KB · Views: 668
  • MobileVisionV1.51.zip
    19.3 KB · Views: 1,210
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Prepare for crashes

It is just a quick hack to try if it works. I just tested some barcodes..
ORC i get not recognized texts. But i was using blurry texts...
And for facregocnition i need to switch camera i could not try so far
 

mczubel

Member
Licensed User
Longtime User
I have this error:
 

mczubel

Member
Licensed User
Longtime User
Okay, this is the log now:
TxtRecognizer_onScanResults(false,Scan Failed: Found nothing to scan)
is a simple text:"Documentacion con vencimiento" in a white paper.
 

JordiCP

Expert
Licensed User
Longtime User
I have just tested it pointing my camera at this same thread, and worked perfectly!

 

mczubel

Member
Licensed User
Longtime User
work perfect!!!
 

Chicao99

Member
Licensed User
Longtime User
Always getting "Face_onFaceDetectResult(false,Scan Failed: Found nothing to scan)", any suggestions?
Regards.
 

wes58

Active Member
Licensed User
Longtime User
I get the same error
I wouldn't be surprised that this is the same issure I posted in Johan's thread about OCR.
Are you taking the photo with camera in Portrait? If so, the problem probably is the way the camera saves the picture, and it need to be
 

sdujolo

Member
Licensed User
Longtime User
I wouldn't be surprised that this is the same issure I posted in Johan's thread about OCR.
Are you taking the photo with camera in Portrait? If so, the problem probably is the way the camera saves the picture, and it need to be
Hi,

I have tested both portrait and landscape.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…