How do I make the camera focus only inside the rectangle and read the text inside the rectangle and when reading the number according to a certain condition, for example, that the length of the number is 11, it is transferred to another page automatically, the value is sent to it The project link on the github
https://github.com/mohanad87m/camer_number_reader
Asked
Active
Viewed 2,829 times
2

mohanad.99
- 173
- 1
- 2
- 9
-
Like a barcode reader, but only numbers – mohanad.99 Jul 05 '21 at 20:32
-
2You can try Google ML Kit's text recognition API (https://developers.google.com/ml-kit/vision/text-recognition/android) and feed it with the cropped image inside the rectangle. – Dong Chen Jul 13 '21 at 18:43
-
How do I crop the image I want an example code – mohanad.99 Aug 25 '21 at 20:20
1 Answers
2
Here is a similar question with some solutions you can take a look. Is there a way to crop Image/ImageProxy (before passing to MLKit's analyzer)?
Another idea is not cropping the image, instead filtering out the barcode result (based on the bounding box) if it's not in the specified area.

zhouyi
- 226
- 1
- 4