GET Recognize Template Fails: Trouble Scanning OMR Sheet Due to Reference Point Error

Context: Using Postman for API Request Handling with Aspose.OMR

I’m currently integrating the Aspose.OMR API and encountering an issue during the recognition phase. Here’s a step-by-step breakdown of what I’ve done so far:

  1. Account Setup:
  • Created an account on the Aspose dashboard.
  • Registered an application and obtained the access token.

2.Generate OMR Template

  • Sent a POST request to the Generate OMR endpoint.
  • Used base64-encoded source code from the Answer Sheet Barcode Example as the MarkupFile.
  • Request body sample:
{
  "MarkupFile": "...",
  "Images": {},
  "Settings": {
    "PaperSize": "A4",
    "BubbleColor": "Black",
    "FontSize": 14,
    "FontFamily": "Arial",
    "FontStyle": "Regular",
    "Orientation": "Vertical"
  }
}
  1. Retrieve Generated Files
  • Received a response with both PNG and OMR data.
  • Sample response:
{
    "id": "...",
    "responseStatusCode": "Ok",
    "results": [
        {
            "type": "Png",
            "data": "..."
        },
        {
            "type": "Omr",
            "data": "..."
        }
    ],
    "error": null
}
  1. Printed and Captured the Filled Sheet:
  • Printed the PNG file, filled in bubbles manually.
  • Captured the completed sheet using a mobile phone (flat-lay shot).
  • Encoded the photo to base64.
  • Sent a POST request to the Recognize Template endpoint with the following body:
{
    "Images": [ "..." ], // base64 of captured photo
    "omrFile": "...", // base64 of initial source code
    "outputFormat": "CSV",
    "recognitionThreshold": 35
  }
  1. Error:
  • Received the following error on calling GET Recognize Template:
{
    "id": "9930a934-d13b-4856-930b-39d1645a1222",
    "responseStatusCode": "Error",
    "results": null,
    "error": {
        "messages": [
            "Failed to find all reference points on image! Please make sure they are clearly visible and have enough blank space around them."
        ],
        "warnings": []
    }
}

Issue:
Despite following the documentation, I keep getting the same error about missing reference points. I’ve tried with different images (attached below), but no success.

Office lens image
2025_05_05 14_50 Office Lens.jpg (378.3 KB)

iPhone photo
IMG_3278 (1).jpeg (368.0 KB)

Request for Help:
Could you please advise what might be causing the issue? Are there best practices for photo capture (e.g., margin spacing, angle, lighting) that I might be missing?

Note:
I’m a Flutter developer working to integrate this API into a mobile project. Any tips or SDK recommendations related to Flutter would also be appreciated.

@Testing45845

It seems that you are encountering an issue with the recognition phase of the Aspose.OMR API, specifically related to missing reference points in the image of your filled OMR sheet. Here are some suggestions to help you troubleshoot and improve the recognition process:

1. Ensure Reference Points are Visible

The error message indicates that the API is unable to find all reference points on the image. Make sure that:

  • The reference points (usually corners or markers) are clearly visible in the captured image.
  • There is sufficient blank space around these reference points to avoid any interference from other elements in the image.

2. Photo Capture Best Practices

When capturing the image of the filled OMR sheet, consider the following best practices:

  • Lighting: Ensure that the image is well-lit to avoid shadows or glare that could obscure the reference points.
  • Angle: Capture the image from directly above the sheet to minimize distortion. Avoid tilting the camera.
  • Focus: Make sure the image is in focus, as blurry images can lead to recognition errors.
  • Margins: Maintain adequate margins around the sheet to ensure that the entire form is captured without cropping any important parts.

3. Image Quality

The quality of the image can significantly affect recognition accuracy. If possible, use a scanner instead of a mobile phone camera, as scanners typically provide better image quality and consistency.

4. Adjust Recognition Threshold

You are currently using a recognition threshold of 35. Depending on the quality of the filled bubbles, you might want to experiment with this value. A higher threshold may help in cases where the bubbles are not filled completely or are faintly marked. However, be cautious, as setting it too high may lead to missed marks.

5. Testing with Different Images

Since you mentioned trying different images, ensure that all images are taken under similar conditions to maintain consistency. If possible, test with a known good image that has previously worked to isolate whether the issue is with the image capture or the API itself.

6. Review Documentation

For further details on recognizing machine-readable forms, you can refer to the official documentation, which provides insights into best practices and troubleshooting tips.

If you continue to experience issues after trying these suggestions, consider reaching out to Aspose support for more tailored assistance.

Additional Resources

Feel free to ask if you have any more questions or need further assistance!

Hello, @Testing45845

I will investigate this issue and post results here.

Thank you for your detailed feedback!

Hello, @Testing45845

I have investigated provided images for described issue. I believe that exception is thrown because of a non-standard size of reference points, see attachment.
ref_size.jpg (82,6 КБ)
Please notice that changing size of reference points in graphical editors is not supported.

But we are investigating the possibility to add API to control size of reference points in future releases. At the current moment .NET library have an API to change position of reference points - Offset | Aspose.OMR for .NET API Reference.

Regarding SDK - we have Aspose OMR Cloud SDK for Dart.
Which could help with boilerplate code for API calls.