Следующий код помогает извлечь текст из изображения
`implementation 'com.google.android.gms:play-services-vision:17.0.2'
TextRecognizer textRecognizer = new TextRecognizer.Builder(getApplicationContext()).build();
Frame imageFrame = new Frame.Builder()
.setBitmap(bitmap)
.build();
String imageText = "";
SparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);
for (int i = 0; i < textBlocks.size(); i++) {
TextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));
imageText = textBlock.getValue();
}`
$ imageText возвращает текст, который вы можете сохранить в вашей базе данных