Aspose.OCR Empty Fitler Exception

Hi Team,

Below code throw error for any tiff file. I wanted to clear processing filter for some reason. It throw exception.

Sample code

			RecognitionSettings drsMultiplePage = new()
			{
				UpscaleSmallFont = true,
				Language = Language.Eng,
				DetectAreasMode = DetectAreasMode.TABLE,
				LinesFiltration = false,
				ThreadsCount = 0
			};

			Aspose.OCR.Logging.Console = true; Aspose.OCR.Logging.FileSystem = true; Aspose.OCR.Logging.LogFilePath = "recognition.log"; Aspose.OCR.Logging.LoggingLevel = LoggingLevel.Debug;

			Resources.AllowAutomaticDownloads(true);
			AsposeOcr api = new AsposeOcr();
			License lic = new License();
			Aspose.Imaging.License ImgLic = new();
			ImgLic.SetLicense("Aspose.Total.NET.lic");
			lic.SetLicense("Aspose.Total.NET.lic"); Console.WriteLine("License " + lic.IsLicensed);

			string Filename = Path.GetFileName(imgPath);

		PreprocessingFilter pp = new PreprocessingFilter
		{
			Aspose.OCR.Models.PreprocessingFilters.PreprocessingFilter.Empty
		};


			int pgcount = 0;
			OcrInput ocrInput = new OcrInput(InputType.TIFF, pp);
			ocrInput.Add(imgPath);
			
			
			Stopwatch stopwatch = new Stopwatch();
			stopwatch.Start();
			List<Aspose.OCR.SkewOutput> skewOutputs = api.CalculateSkew(ocrInput);
			stopwatch.Stop();



			Console.WriteLine(" Started " + imgPath + " Pages :" + pgcount + " Skew wait: " + stopwatch.Elapsed + " skewAngle " + skewOutputs[0].Angle);

			stopwatch.Restart();

			List<RecognitionResult> result = new List<RecognitionResult>();
			for (int i = 1; i <= 1; i++)
			{
				stopwatch.Start();
				if (i == 1) drsMultiplePage.DetectAreasMode = DetectAreasMode.PHOTO;
				if (i == 2) drsMultiplePage.DetectAreasMode = DetectAreasMode.PHOTO;

				result = api.Recognize(ocrInput, drsMultiplePage);
				stopwatch.Stop();
				Console.WriteLine(drsMultiplePage.DetectAreasMode.ToString() + " Time:" + stopwatch.Elapsed.ToString() + "Pages" + pgcount);

				CompleteResult Source = new CompleteResult();
				stopwatch.Restart();
				string outputpath = Path.GetFullPath(imgPath) + "_searchable_" + drsMultiplePage.DetectAreasMode.ToString() + "_NEW32.pdf";

				AsposeOcr.SaveMultipageDocument(outputpath, Aspose.OCR.SaveFormat.Pdf, result);
				stopwatch.Stop();
			}

EmptyFilterErrror.PNG (25.1 KB)

Until this error is resolved can you provide me away to clear the autoskew filter if the skew angle is > 20 degree

For attached image the skew angle is 180 I wanted to clear the filter . Any assistant will be great

NOPHI_A212519133_20240904_114428_46_47.7z (71.4 KB)

Regards,
Gajanan

@Gpatil

We have logged a ticket as OCRNET-912 in our issue tracking system for sake of investigating the issue you mentioned. We will inform you once it is resolved. In the meanwhile, we are gathering the information about your question and will get back to you soon.

@Gpatil

About the skew angle, we will investigate the ability to improve angle detection on such images (with black picture inside). Because the main problem - our network works with text and makes mistake on the images with pictures. A ticket as below has been logged for further investigation.

Issue ID(s): OCRNET-914

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.