Please take your time to test the template and in case you need further assistance, please feel free to let us know.
@asad.ali
We are getting following error for the finaltemplate.omr while processing image attached.FinalTemplate.zip (80.7 KB)
FinalTemplateData.zip (99.3 KB)
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
stacktrace – at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at .(Bitmap )
at .(Stream )
at .(String )
-
$exception {"Could not load the specified file."C:\\"TestData\\FinalTemplateData.png"} System.IO.FileLoadException
We also tried with FinalBig.omr template and tried with mobile device but it is not recognized image and not getting answers out of it, please see attached image for your reference.image.png (687.2 KB)
FinalTemplateBig.zip (695.9 KB)
We are also facing multiple select answers not able to process with attached template. can you please resolve this issue and send use template.72e1e7ca-bc84-46da-80b3-5fe56687653f.jpg (213.9 KB)
we are getting following error:
Failed to find matching between the template and the image!
at Aspose.OMR.Api.TemplateProcessor.(List`1 , Int32 , Int32 )
at Aspose.OMR.Api.TemplateProcessor.(String , Int32 )
at Aspose.OMR.Api.TemplateProcessor.(String , Int32 )
at Aspose.OMR.Api.TemplateProcessor.RecognizeImage(String imagePath, Int32 recognitionThreshold)
We are using Template as attached. FinalBig.zip (102.5 KB)
we have observed that, some questions are not able to process by the aspose omr due to the paper is curvey. Please find different images that can process question number 8 and also not able to process question number 8 due to paper is curvey.
question number 8 not able to processed due to border is not straight but it is curvey.PNG (347.7 KB)
question number 8 processed due to border is straight not curvey.PNG (290.9 KB)
@asad.ali
we are processing same image but it is not process all answers, can you please check.not-processed all answers-1-20pm-26july2019 - Copy.PNG.jpg (313.9 KB)
@asad.ali
Attached image is not processing, please check and update.6ff8cc6d-a608-471c-98a7-2f8ceb6cdf7e.jpg (202.2 KB)
We are not able to process answers and it gives us following error:
System.Exception: Failed to find matching between the template and the image!
at Aspose.OMR.Api.TemplateProcessor.(List`1 , Int32 , Int32 )
at Aspose.OMR.Api.TemplateProcessor.(String , Int32 )
at Aspose.OMR.Api.TemplateProcessor.(String , Int32 )
at Aspose.OMR.Api.TemplateProcessor.RecognizeImage(String imagePath, Int32 recognitionThreshold)
Can you please provide us the steps / criteria to scan using mobile camera / width / height of the image or horizontal and vertical size of the image in pixel to process the answers ?
6ff8cc6d-a608-471c-98a7-2f8ceb6cdf7e.jpg (202.2 KB)
As shared earlier, this template will work with Aspose.OMR for Cloud instead of Aspose.OMR for .NET because Aspose.OMR for Cloud does not require reference points.
We have tested the scenario in our environment and were not able to find any issue. Please check attached screenshot. CorrectResults.png (712.6 KB) Also, it seems you are using a different image with the template. Would you please share that image with us, so that we can test it in our environment.
We have updated the details of ticket according to this and will share our feedback after investigating the scenario accordingly.
We tried to use FinalBig.omr to process this image and were unable to notice any exception or incorrect results. Please find attached screenshot:
CorrectResults2.png (522.2 KB)
Could you please share the image actually used in this screenshot so that we can test the scenario accordingly.
@asad.ali
Thank you for your time and help, but we are not able to process all images, and more are failing with different errors like template not matching etc.
I have attached all non-processed images. not-processed.zip (2.0 MB)
We are following this code attached.Aspose.OMR.ConsoleDemo.zip (839.2 KB)
Can you please provide us how to scan the images? we are capturing from the mobile devices. Also please provide us the criteria for scanning like the image size, image width and height, image resolutions or the light on the image / shadow on the image while scanning ?
Also please provide your solution (c# code that you process the image without cloud solution and also not using omr client(exe), we need the downloadable c# dll code to process the images.
your help will be appreciated.
Thank you for sharing requested data.
We are collecting information and will get back to you with our findings soon.
We need to test all different images, can you please look the issue and fixed and let us know how to properly scan images without error. we are waiting for your reply. we need to urgently fix all issue and provide demo to the client so that we can finalize your omr product and purchse it.
Thanks for your patience.
We have further investigated the scenario and found that the exception was not caused by the multiple answers but, by the fact that reference points were located very close to the border line - which caused errors during image processing. The best way to deal with such issues is to remove borders completely.
We also advise to use as less borders or additional lines on template as possible (check our test data on Github to see examples of cleaner borderless templates: https://github.com/aspose-omr/Aspose.OMR-for-.NET/tree/master/TestData). If you still want to use borders on image, it is required to move reference points further away from borders to avoid issues.
In the attached archive there are two folders:
- LargerSpace, with edited image and template and more space around reference points. Still, there is a possibility that some of poor quality photos may not be recognized. We recommend using NoBorders to avoid issues completely.
- NoBorders, which contains edited image and template, as well as several photos demonstrating that with clearly visible reference points almost any kind of image can be recognized. Photo “1.jpg” is rather good quality, while “2.jpg” and “3.jpg” are rotated and curved. Still, it is possible to fully recognize such images.
For some poor quality photos, like “2.jpg” and “3.jpg” it is required to use custom threshold value for bubbles recognition like so:
int customThreshold = 40;
OmrEngine engine = new OmrEngine();
TemplateProcessor templateProcessor = engine.GetTemplateProcessor(templatePath);
RecognitionResult result = templateProcessor.RecognizeImage(imagePath, customThreshold);
This threshold represents the percentage of black pixels in the bubble and surrounding area, which is processed during recognition. Not all images may work perfectly on default value (which is currently set to 45), especially rotated or skewed. In such cases, it is required to find best fitting value to achieve best results. Usually lowering the threshold a bit allows to correctly process such images.
Templates (1).zip (3.5 MB)
We have generated another ticket as OMR-462 in order to investigate against these images and will surely share our feedback as soon as investigation is complete. Please spare us little time.
PS: We were unable to notice any issue with the image (86dcef93-c19b-4655-99c6-3f54d8fbf939.jpg (116.1 KB)) from the archive.
We tried with new template but it is not working. I have attached scanned image and the result, so that you can look into this issue.not-processed.JPG (120.9 KB)
2f3fe395-8186-4b08-acf8-efc6469adae7.jpg (94.2 KB)
Also some times following error comes, while processing:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
threshold-40 we are using.JPG (174.2 KB)
Regarding this ticket, the issue is the same as in OMR-450: Reference points located too close to borders, which causes them to merge during image processing. Thus, reference points can’t be detected and exception occurs. To avoid this:
- Make sure that reference points has enough blank space around them
- Reference points should be clearly seen on photo (for example, on image
1ceaeeb0-57ad-45f1-b97a-62dde919f659
from archive one of the points is cut, thus making this photo unprocessable).
We have already shared templates with same image but no bounds and another template with larger spacing.
We will check this and will let you know about our findings. Please spare us little time.
I tried with your new template largespace, but from iPad I scan the image and it gives us template not matching error.
d7be549d-5219-41a0-82f1-1171bf5af575.jpg (146.7 KB)
Error: Failed to find matching between the template and the image!
As per your instruction, this attached image has four reference points with enough space around it. But still it can not recognize.
We will look into this and will let you know as soon as investigation is complete. Please note that a new version of the API has been released which offers template generation functionality from simple text markup. We are working over adding examples in public documentation and will share with you as soon as process is completed.