Android-OCR | simple Android OCR ( Optical Character Recognition | Computer Vision library
kandi X-RAY | Android-OCR Summary
kandi X-RAY | Android-OCR Summary
A simple Android OCR (Optical Character Recognition) application that makes use of with Camera or Gallery (Image to Text).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Invoked when an item is selected
- Display an image import dialog
- Check camera permission
- Check if we can write external storage
- Show info dialog
- Request camera permission
- Requests storage permission
- Handle permission result
- Pick image from camera
- Picks an image from gallery
- Handle image result
- Initializes the instance
Android-OCR Key Features
Android-OCR Examples and Code Snippets
Community Discussions
Trending Discussions on Android-OCR
QUESTION
Starting with this sample project [ https://github.com/googlesamples/android-vision/tree/master/visionSamples/ocr-reader ], I have been able to implement filtering in the OcrDetectorProcessor.receiveDetections()
method.
This works, but com.google.android.gms.vision.text.TextRecognizer
appears to search the the entire screen for characters.
I presume that the receiveDetections()
method could be called more frequently if a smaller portion of the screen were being scanned for characters instead of the entire screen.
Is it possible to specify a smaller portion of the screen to be scanned? It should be straight-forward to direct the user, through a change to the graphic overly, to position their camera so that this smaller portion of the screen contained the target text, but I'm unsure as to how to tell the processor to use just a small portion of the frame when doing it's OCR processing.
What would need to be altered to specify that the OCR should operate on a subset of the frame?
ADDITIONAL INFORMATION:
I tried to subclass TextRecognizer
, but it's marked final
, and the source appears to be closed.
So I'm expanding the question to how the functionality of the ocr-reader sample could be replicated using Tesseract.
I found this link, but haven't explored converting the concepts there into camera frames as opposed to a single image file.
...ANSWER
Answered 2019-Aug-21 at 17:04I had a similar issue and resolved it by using Tesseract and a simple cropping library called "Android Image Cropper" - Link here .
Basically I just crop the image before passing it for processing. Here is a small sample of my code:
This line will start new activity for a result:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Android-OCR
You can use Android-OCR like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Android-OCR component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page