Search code examples
androidandroid-vision

Android vision text OCR api for single image


How to read/analyse text which is in a single image.

Example given in android document is using CameraSource api to find text from camera captured image. I want to find/read text in a JPG file, is there any option to do using mobile vision api?.


Solution

  • Yes. You can build a frame from the .jpg, https://developers.google.com/android/reference/com/google/android/gms/vision/Frame

    then run textRecognizer.detect(frame).