Image to Text, Capture direct from Display Image

Hi Scott, I just purchased Image to Text and am working through how to use it.

I would like to capture an image to the display and then OCR it without generating an image file.

Is this possible?

media.capturePhoto() lets me save the image to a display object

but

imageToText.convert wants a file name to work from.  

Is it possible to pass a display object to this function or create another function to work off of a display image?

(I am working towards OCR on the fly)

Thanks for the help, Greg

No, you have to convert the display object to an image first.

Well that sucks,  a waste of 10 bucks…

There are various display.save(), .capture() etc. API’s that will save the display to a file. Look those up. I think you would need to create a display.newGroup(), add the image to it and use the appropriate capture tool that saves a display group. Then you should be able to use the OCR plugin to process the file.

Probably about 3 extra lines of code (2 if you don’t mind showing the image in your app)

Rob

Hi Rob, the control is slow as molasses… saving the image and then processing it slows it down even more. I wanted to do this project in Corona but I have to switch over to Android Studio and Google Vision API to get it done. (my goal is on the fly OCR)