Exception inputVector.Length != _weights.Length

Hi

I’m having a weird error while testing the component.
Here is my code

using System;
using System.IO;
using Aspose.OCR;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OcrEngine ocr = new OcrEngine();
ocr.LanguageContainer.Clear();
ocr.LanguageContainer.AddLanguage(LanguageFactory.Load(Server.MapPath(“~/app_data/Aspose.OCR.French.Resources.zip”)));
using (ocr.Image = ImageStream.FromFile(@“c:\temp\foncia.jpg”))
{
if (ocr.Process())
{
// Get the complete recognized text found from the image
Response.Write("Text recognized: " + ocr.Text + “

” + Environment.NewLine);
}
}
}
}

The ocr.Process() raises an exception
System.ArgumentException: inputVector.Length != _weights.Length

I’m attaching the picture (The original version of the image 2208x1656 pixels, 6.5Mb)

Regards
Philippe

Hi Philippe,

We are investigating the issue and will update you soon.

Best Regards,

Hi Philippe,

Sorry, We were not able to reproduce the using the latest version of Aspose.OCR for .NET i.e. 3.4.0. Can you please confirm if you are using the latest version?

The accuracy of the extracted text is not up to expectations as your image has a low DPI value. Aspose.OCR works well with images having a DPI value of 300 and accuracy rate tends to decrease with the decrease in DPI value. An issue to improve accuracy rate for low DPI images has already been logged into our issue tracking system as OCR-34250. We will keep you updated on this issue in this thread.

Best Regards,

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.