When I OCR the attached photo, an error occurs as in the attached photo.print.jpg (339.1 KB)
OCR-ERROR.JPG (90.8 KB)
Would you please make sure that you are using x64 mode of debugging? Please try to create a sample console application from scratch and install the API using NuGet Package Manager. In case you still notice any issues, please share that application with us in .zip format. We will test the scenario in our environment and address it accordingly.
Thank you!! Program is running well but result is not acceptable!!!
Could you please share which image are you processing and also share the results you are getting? We will log an issue after testing the scenario in our environment and share the ID with you.
Can you please try using the code snippet below and share the obtained .txt file with us?
Aspose.OCR.AsposeOcr api = new OCR.AsposeOcr();
var result = api.RecognizeImage(dataDir + "print.jpg", new Aspose.OCR.RecognitionSettings
{
DetectAreas = false,
RecognizeSingleLine = false,
AutoSkew = true,
AllowedCharacters = Aspose.OCR.CharactersAllowedType.ALL,
//AutoContrast = true,
Language = Aspose.OCR.Language.Eng
});
result.Save(dataDir + "recResults.txt", Aspose.OCR.SaveFormat.Text);
An issue as OCRNET-452 has been logged in our issue tracking system for this case. We will further check it and let you know once it is fixed. Please be patient and spare us some time.
We are sorry for the inconvenience.
Aspose.OCR 22.2 was released in February. With this version of the application, you can use the new text detector.
Unfortunately, the image is with a black background, so you have to pre-invert it.
Set the PHOTO recognition mode. The result you can get is attached
The code example:
string img = "print.jpg";
AsposeOcr API = new AsposeOcr();
RecognitionResult res = api.RecognizeImage(img, new RecognitionSettings{
DetectAreasMode = DetectAreasMode.PHOTO,
AutoContrast = true,
PreprocessingFilters = new PreprocessingFilter
{
PreprocessingFilter.Invert()}
});
Console.WriteLine(res.RecognitionText);
result.zip (12.6 KB)