I am wondering how can I use the Google text recognition (OCR) with ARCore?
When I use the OCR sample to put some text above the detected text? It is jumping around as images are coming in. However I would like to anchor it to the text so when the camera moves, it is attached to it like ARcore
I couldn't find a way to do that? Google Lens does that
Any help or pointer is appreciated
Thank you
Related
I downloaded the ML Kit sample code for Android and i'm having a hard time to go about setting a limited detection area for the live camera detection (I'm only interested in text recognition, i got rid of everything else).
I need to limit the text recognition to only a part of the screen (say, a tiny rectangle or square in the center of the screen). Has anyone done such a workaround with ML kit?
Please take a look at the ML Kit Translate Showcase App which shows how to limit Text recognition to a specific section of the screen.
Are any of the current text capture APIs (e.g. Google's Text API) fast enough to capture text from a phone's video feed, and draw a box that stays on the text even as the camera moves?
I don't need fast enough to do full OCR per-frame (though that would be amazing!). I'm just looking for fast enough to recognize blocks of text and keep the bounding box displayed in sync with the live image.
There are two major options for good results. They are both C++ but there are wrappers. I've personally played with OpenCV for face recognition and the results were promising. Below links with small tutorials and demos.
OpenCV
Tessaract by Google
Firebase
onDeviceTextRecognizer is simple and working for me.
I'm building an Android app that has to identify, in realtime, a mark/pattern which will be on the four corners of a visiting card. I'm using a preview stream of the rear camera of the phone as input.
I want to overlay a small circle on the screen where the mark is present. This is similar to how reference dots will be shown on screen by a QR reader at the corner points of the QR code preview.
I'm aware about how to get the frames from camera using native Android SDK, but I have no clue about the processing which needs to be done and optimization for real time detection. I tried messing around with OpenCV and there seems to be a bit of lag in its preview frames.
So I'm trying to write a native algorithm usint raw pixel values from the frame. Is this advisable? The mark/pattern will always be the same in my case. Please guide me with the algorithm to use to find the pattern.
The below image shows my pattern along with some details (ratios) about the same (same as the one used in QR, but I'm having it at 4 corners instead of 3)
I think one approach is to find black and white pixels in the ratio mentioned below to detect the mark and find coordinates of its center, but I have no idea how to code it in Android. I looking forward for an optimized approach for real-time recognition and display.
Any help is much appreciated! Thanks
Detecting patterns on four corners of a visiting card:
Assuming background is white, you can simply try this method.
Needs to be done and optimization for real time detection:
Yes, you need OpenCV
Here is an example of real-time marker detection on Google Glass using OpenCV
In this example, image showing in tablet has delay (blutooth), Google Glass preview is much faster than that of tablet. But, still have lag.
Ok so I have been researching this for a while to no avail.
I am creating a google glass app that will look at a building and tell you the distance from that building. I have the coordinates of the building hardcoded and I now need to display the distance (text variable) to the camera preview.
I have looked at other examples of "overlaying text on the camera preview" that pertain to Android, but nothing that pertains to Google Glass. So can someone explain how to overlay a text box on the camera preview?
i`m trying to write an application that will detect red objects appearing in a live preview (taken from the camera.
my goal is to provide a gray-scale preview and on top of it to show the red colored objects.
i`v read this, and was trying to play with the OpenCV-2.3.1 samples but with no avail...
any kind of help would be much appreciated!