OCR and storing of images

ranorga
Participant V

Dear Community:
When using the OCR function, the photo is captured first, and then the text data in the photo is recognized. But, in a continuous process of label scanning this generates a large number of photos which are stored. I wonder, could AppSheet read the photo (as OCR) without storing it, just as it does when reading a QR or barcode?

0 12 1,054
12 REPLIES 12

tony1
Participant V

Hi @SmartD, right now you need to store the photo to get the text. Could you say more about your use case?

Hi Tony:
We have bags of different types of flour that leave a production line continuously. Every day inventories are made to find out where the flour is stored and to be able to dispatch it according to the batch and the expiration date. Our intention is to optimize the inventory process for which, instead of writing the batch and the expiration date on a form, we only read the label that the product has. But the label does not have a barcode and while generating new labels with barcodes we wanted to make OCR captures of the label, but we are concerned that it will store a lot of space because the photo of each label is stored. So I wanted to know if there was any way for OCR to work like reading barcodes or QR, without storing images.

For something like this, you could create a separate table that operates as your form. This table could only have one row, with columns that reset on every edit. You can also set the images to be uploaded at the lowest quality. When the user saves this form, you can copy all the pertinent information (like the OCR) to your main table.

The images will still be uploaded, but without any references to displaying them, the app wonโ€™t attempt to load them, and therefore the speed of your app should be preserved. You can then just go into your cloud storage and delete the pictures occasionally.

Not perfect, but it should work in your situation. Iโ€™m still waiting for OCR to be able to work for images that are already pre-uploaded and referenced via a relative path.

If youโ€™re using google sheets in a gdrive you may be able to use GAS to delete the image after the record is created.

@SmartD I need the same and tried different things.

An Event Action on Form Saved, that deletes the [Image] column.
Itโ€™s possible. The image column getโ€™s deleted, but the image will be stored in Google Drive.
So you wonโ€™t see the image in your App, but it will consume storing space.

Manually deleting the image while still in the form view.
In the [Image] column you can set the Require? to ISBLANK([OCRTEXT]) and the Valid if to ISBLANK([_THIS]). This will make image required. After OCR is extracted, the image column will get invalid. User would have to manually delete the image before he could save the form.
But: When you delete the image, also the OCRTEXT gets deleted, because itโ€™s somehow connected to each other. The user has to interact with the [OCRTEXT] column, like adding a space. Once interacted, he can delete the image and the OCRTEXT will stay.

ranorga
Participant V

Thanks to everyone for your replies.
I conclude that the best solution to this problem is that AppSheet improves the platform so that reading a label via OCR does not imply scanning and saving the image, just as it is done when reading a barcode or QR.
The second alternative would be to create a script that automates the deletion of the images that are saved as a result of reading OCR. But finding this script and making it work in AppSheet is a problem for the less expert if we donโ€™t have a sample.
The third and least desired alternative would be manual deletion.
Hopefully AppSheet can help us with the first or second alternative.

Here is the feature request

This was working. Or it never worked and I was stupid

ranorga
Participant V

Thanks a lot Fabian for taking the time to respond. It seems to me that what you are doing is deleting the link to the image in the table, but this would have already been uploaded to the Drive. In any case I will do the test.

Yes thatโ€™s right.

hello,
With zapier you can make a very easy integration so that every time a new image enters the Google Drive, it is deleted.

Gracias Fredy.

Hello, I'm not an expert, but if you try to indicates de same ID for your OCR.

It erase the all image and use the new, then make a bot to copy to another sheet with the correct ID for this data.

It's an idea. 

 

 

Top Labels in this Space