Recognize receipt with processTextField

  • Last Post 15 January 2013
tLewis posted this 15 January 2013

So I need to recognize receipts from restaurants and pull the total out to operate on it. I only am concerned with the numbers on the receipt, so I am trying to figure out the best way to do this. I am currently just using processImage and getting all the text back and running it through a regex to pull out the numbers and then the total. But I want to figure out if I can use processTextField instead, since I am only concerned with a small amount of text and since processTextField is much cheaper. But I also don't want to loose to much accuracy and I can't specify a region easily, so it would still be best to process the whole picture. Any helpful suggestions?

Thanks for the help.

Order By: Standard | Newest | Votes
Andrey Isaev posted this 15 January 2013

processFields is good when the whole picture is small or you need to recognize only part of large image with predefined coordinates. Since total amount can be anywhere on the receipt, you should recognize whole image anyway to find total. So it looks like what you do now is optimal solution.

tLewis posted this 15 January 2013

I thought you might say that, but I was hoping you would not. I was hoping I might be able to tune processFields in order to suit my needs, as it is more economically feasible and since I need such a small amount of information, but I suppose processImage would still be the best way to do it.