We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Omr RecognizeImage error: Index was outside the bounds of the array

hi
I have designed a template to test .net componnet
but the error “Index was outside the bounds of the array” occurs when running this line of code:
templateProcessor.RecognizeImage(img);

what is the problem? I have attached template, .omr file and test file
test.zip (967.4 KB)

@ydcnet

It looks like the reference points are too close to the content. However, we have logged a ticket as OMRNET-658 in our issue tracking system to further check it. We will try to rectify it and generate a valid template for you and share with you as soon as the ticket is resolved. Please be patient and spare us some time.

@ydcnet

Since 22.8 release of Aspose OMR for .NET, it has fifth reference points, as seen in your picture and additional ReferenceType (see attachment).

Provide ReferenceType as seen in example and template will successfully recognize. example.zip (54.5 KB)

thank you
adding ReferenceType fix that (But i did not found any documentation about this in your website… )
and now the problem is i have a qr code barcode field with this difinition:
{
“Type”: “Barcode”,
“Name”: “id”,
“Width”: 344,
“Height”: 261,
“Top”: 77,
“Left”: 1840,
“BarcodeType”: “qr”,
“QrVersion”: 1
}

but after calling RecognizeImage the barcode field does not exist in returned RecognitionResults object at all (even with empty value or error … )
is there any mistake in the markup ?

and also some other ChoiceBox fields have empty value in RecognitionResults but they are checked at scaned form how i can fix these problems and increase accuracy?

@ydcnet

We will be surely updating our documentation as soon as possible. Additionally, we have recorded your feedback under the ticket and will update you as soon as we have some feedback against your requirements. Please spare us some time.

@ydcnet

Thank you for your feedback!

We advise to use templates generated using Aspose.OMR for .NET library.
It will help avoid syntax errors in .omr files.

In provided Barcode example there are syntax errors:

  1. “Type” field have to be “BarcodeDownloadable”
  2. “QrVersion” is best to use “0” value - “Auto”.

Regarding ChoiceBox issues - please provide examples.

there is no results for BarcodeDownloadable when searching in all of your documentation!

is this documentation incorrect or is not usable for omr .net ?

is there any tool that can design forms with custom design visually ? if yes please send me a link or documentation to use

i have attached an example for ChoiceBox issues:
test.zip (980.6 KB)

in the zip archive i have only create a copy of template file (tmp.png) to test.png and opened it with paint and fill some of choiceboxes (without any movement , rotation or noise of scanner or camera) and save the file …
these fields have incorrect value in results:
Question63
Question64
Question66
Question67
Question70
Question71
Question200
Question244

@ydcnet

As shared earlier, we are planning to update our documentation as per the new changes and features in the API. Sadly, it is not yet fully updated.

Furthermore, we will be replying to your questions related to your requirements after collecting information from our side. Please spare us little time.

@ydcnet

We have GUI tools:

At the current moment we have GUI tools without fifth point and rotation support (up to 22.7 library version):

  1. GUI Generation and Recognition using Aspose OMR Cloud - https://github.com/aspose-omr-cloud/aspose-omr-cloud-dotnet/tree/master/Aspose.OMR.Client - example of interface is in attachment
  2. Demo for recognition support with GUI - https://github.com/aspose-omr/Aspose.OMR-for-.NET/tree/master/Aspose.OMR.GuiDemo - example of the interface is in the attachment
  3. Web application for simple AnswerSheet creation - https://products.aspose.app/omr/template-builder/

At the current moment to draw a template with rotation support, there is only a 22.8+ library.

Regarding recognition errors - in the attachment, there is an example of bubble recognition (from https://github.com/aspose-omr/Aspose.OMR-for-.NET/tree/master/Aspose.OMR.GuiDemo )
It appears there is an error in bubble allocation.

Again - please use generated templates.

We are also happy to announce that in the few next releases we plan to add RTL support with Persian and Arabic locales.
Untitled.png (220.4 KB)
Untitled2.png (171.0 KB)

I have attached an screenshot of designed form in Aspose.OMR.Client
problem2.png (133.3 KB)

i did not found any problem in design tool and it seems all choiceboxes defined correctly

but please compare red area with Untitled.png you sent in previous post

it seems that the area detected by Aspose.OMR.GuiDemo is different from area defined by Aspose.OMR.Client !!!
specially in fields of downside of the sheet
what is the problem or if there is an error in bubble allocation, in witch field? how to resolve that ?

@ydcnet

We have recorded your feedback along with the ticket and will let you know as soon as we have further updates against it.

@ydcnet

Difference in recognition results is dictated by use of two different Aspose products with different use cases.

Aspose.OMR.GuiDemon is powered by Aspose.OMR for .NET library
This library has most recent features and larger amount of template elements, but can provide best results only with templates generated by it.

Aspose.OMR.Client is powered by Aspose.OMR.Cloud
Aspose.OMR.Client can be easily adapted to existing templates, but has limited amount of elements
and has more complex and slower recognition interface.

Our advice is to use Aspose.OMR for .NET library.
If you provide us with example of your template - we can help you create template config for Aspose.OMR for .NET library.

I have uploaded template , .omr file and test file again …
test.png is exactly the template file just filled with windows paint brush
test.zip (979.6 KB)

all choiceboxes defined in .omr file have correct top,left,with and height but .net library can not detect some of them as i said before …

@ydcnet

We will investigate this further as the details have been logged under the ticket. We will inform you once we complete the investigation. Please spare us little time.

@ydcnet

We have investigated provided template and created config to match it.

In attachment there are 200 questions instead of 300 in original template.

In template generation used the smallest bubble size, that would provide positive results.

Settings used in template generation:

            GlobalPageSettings settings = new GlobalPageSettings
            {
                PaperSize = PaperSize.A4,
                Orientation = Orientation.Vertical,
                BubbleColor = Color.Black,
                BubbleSize = BubbleSize.Small,
                FontStyle = FontStyle.Regular,
                FontSize = 9,
                FontFamily = "Segoe UI",
            };

test_config.7z (151.2 KB)

thanks, but i need custom designed form designed by myself and i can’t use auto generated forms …
does your control does not support 300 choiceboxes in a sheet ?
i dont think the bubble size in form i used is large ( i saw many answersheets used by schools have very smaller bubble size than this!

please say me the exact with and height of bubble size that your control have no problem with that ?
does you support Square or oval shaped bubbles? what is readable size for them ?
I need 300 bubbles in a sheet with a design like what i sent to you
can i do that?

@ydcnet

We will soon be sharing our feedback with you in this regard. Please spare us little time.

@ydcnet

Yes, we support Square and round bubbles. See bubble_type property - https://docs.aspose.com/omr/net/txt-markup/answer_sheet/#optional

At the current moment minimal bubble size is 40x40 pixels. This size does produce best results in all supported formats(photo and scan).
We will investigate reducing size in future releases.

At the current moment to increase amount of displayed bubbles we can advise to reduce Left and Right margins, using PageMarginLeft and PageMarginRight property - https://docs.aspose.com/omr/net/generate-template/page-setup/
or use a bigger PageSize, such as Letter or Tabloid - https://docs.aspose.com/omr/net/generate-template/page-setup/

as you can see in sample files i have uploaded here the bubble size in my template is 46x46 pixels that is more than 40x40 !!
{
“Type”: “ChoiceBox”,
“Name”: “Question1”,
“Width”: 197,
“Height”: 48,
“Top”: 415,
“Left”: 349,
“AlignedHorizontally”: false,
“AlignedVertically”: false,
“BubbleHeight”: 46,
“BubbleWidth”: 46,

			}

what will cause errors in detection of the correct position of bubbles in downside of paper sheet ?

@ydcnet

We will get back to you on it soon.