Receipt Survey Forms Recognition: 25 Projects in 25 Days

As part of the LEAD Technologies 25th anniversary, we are creating 25 projects in 25 days to celebrate LEAD’s depth of features and ease of use. Today’s project comes from Justin.

What it Does

This ASP.NET C# application will utilize Forms Recognition to extract data from a receipt survey using LEADTOOLS Version 19.

Features Used

Development Progress Journal

My name’s Justin I’m going to make a simple ASP.NET that performs Forms Recognition on a restaurant receipt.

Quite a few restaurants hand out receipts with optional surveys on them. Customers are typically required to visit a web page and manually enter in a lengthy survey code included on their receipt. With LEADTOOLS Forms Recognition, customers could, instead, just take a picture of their receipt from their mobile device and begin their surveys immediately.

First, I’ll need a receipt with a survey code on it. Time to head to Taco Bell…

Okay, back from Taco Bell. The receipt that I was given has two areas of interest: a 16-digit survey code, and a 5 digit restaurant code.

I’m going to use our Master Forms Editor demo (C:\LEADTOOLS 19\Shortcuts\Forms Recognition & Processing\.NET Class Libraries\Forms (Structured & Unstructured)\Forms Recognition & Processing\Master Forms Editor) to create a master form for this type of receipt. As noted above, I’ll be adding two form fields: a survey code field, and a restaurant code field.

Template generated. Let’s get programming. I’m going to be using the AutoFormsEngine with the Advantage OCR engine to perform the recognition.

I’ve added the recognition code to the project. Some quick image processing will ensure accurate results across a variety of inputs. I’ll be using the following pre-processing pipeline: Auto-binarization, dilation, and color resolution change to 1 bit per pixel.

Now I just need a basic UI. I’ll use an ASP FileUpload control to upload images to the web server, and I’ll display the results in a table and the uploaded image in an ImageViewer.

The UI is complete. I also added some bells (no pun intended) and whistles to the code-behind so that the recognition function can be easily called via a PageMethod in JavaScript. All done!

Download the Project

The source code for this sample project can be downloaded from here.

This entry was posted in Forms Recognition and Processing and tagged , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *