Send OMR form for recognition

To recognize a filled OMR form, send a POST request to the https://api.aspose.cloud/v5.0/omr/RecognizeTemplate/PostRecognizeTemplate Aspose.OMR Cloud REST API endpoint. To authorize the request, pass the access token in Authorization header (Bearer authentication).

The source code and rendering parameters are provided in JSON format in the request body.

{
  "Images": [
  	"Base64 encoded form image"
  ],
  "omrFile": "Base64 encoded recognition pattern",
  "outputFormat": "CSV",
  "recognitionThreshold": 35
}

Providing the form

The form’s image is provided in a value of Images array as a Base64 encoded string. At the moment, only one image will be recognized; other images are ignored.

In addition to the image, you must provide the recognition pattern generated along with the printable form. The recognition pattern is specified as a Base64 encoded string in a value of omrFile parameter.

Output format

Aspose.OMR Cloud can return recognition results in the most popular data storage formats. Recognition result format is specified in the value of outputFormat property.

Format Value Description
Comma-separated values (CSV) CSV A lightweight text format that uses a comma to separate values in a table-like structure. Best suited for spreadsheet applications and simple relational database tables.
JSON JSON The most popular popular open standard format for describing nested data structures. Best suited for NoSQL databases or web.
Etensible Markup Language (XML) XML A universal format for most systems - from databases to CRM.

Recognition accuracy

Recognition accuracy threshold is specified in the value of recognitionThreshold parameter.

Read Fine tuning recognition accuracy for details.

Return value

If successful, this method returns a string with a unique identifier (GUID) of the form recognition request in the queue.

Otherwise, it returns a HTTP status code corresponding to the error.

What’s next

Form recognition will take a few seconds, depending on the complexity of the form, image size, and the current Aspose.Cloud load. See the article Fetch form recognition results for information on how to get recognition results from the server.

cURL example