I have integrated firebase MLKit in my android application. I'm using the on-device TextRecognizer API to detect the text on the live camera feed. It detects the text but it takes a long time to process the image(from 300 milliseconds up to 1000 milliseconds). Due to large latency, the overlay is not smooth like the Google lens app does.
What can I do so that the detected text overlay gets smooth transition between the frames gets processed in larger latency?
Also, I noticed that google lens app detects the text as a whole sentence instead of showing blocks of the texts. How does google lens app able to detect the text as sentences/paragraphs?