This is a simple Android application that demonstrates how to use Google's ML Kit Text Recognition (OCR) to extract text from images. Users can either capture a new image with the camera or select an existing one from the gallery. The recognized text is then displayed on the screen and saved to a local history for later review.
- Text Recognition (OCR): Extracts text from images.
- Camera Integration: Capture images directly within the app.
- Gallery Selection: Pick images from the device's photo gallery.
- Local History: All OCR results are saved to a local database using Room.
- History View: Browse, view, and delete past OCR scans.
- Android SDK (Java): The core application is built using native Android with Java.
- Google ML Kit Text Recognition: The on-device OCR engine for recognizing text in images.
- Room Persistence Library: Used for creating and managing the local SQLite database to store the OCR history.
- View Components: The UI is built with standard Android components like
ConstraintLayout,RecyclerView, andCardView. - ExecutorService: Used for handling background database operations.
- Open the project in Android Studio.
- Build the project to resolve all dependencies.
- Run the app on an Android emulator or a physical device.
- To test with a real image, you can drag and drop an image file from your computer directly onto the emulator window. It will be saved to the emulator's gallery.
- Once the image is in the gallery, use the "Select from Gallery" button in the app to choose it and run the OCR process.
- However, you can use the camera itself. It's a bit complicated with virtual enviroment and 'walking' inside of yet it is possible. Camera must be put to 'Emulated' in setting of an emulator and the image should be put in 'Camera' extended controls