Hello;
I have this code to make OCR recognition with the last version of ASPOSE OCR (2.7.0). The image is generated with 300ppp
Aspose.OCR.License license = new License();license.SetLicense(“Aspose.Total.lic”);
// The path to the documents directory.
//Initialize an instance of OcrEngine
OcrEngine ocrEngine = new OcrEngine();
//Set the Image property by loading the image from file path location or an instance of MemoryStream
ocrEngine.Image = ImageStream.FromFile(“file.tif”);
//Clear the default language (English)
ocrEngine.LanguageContainer.Clear();
//Load the resources of the language from file path location or an instance of Stream
ocrEngine.LanguageContainer.AddLanguage(LanguageFactory.Load(“Aspose.OCR.Spanish.Resources.zip”));
//Process the image
if (ocrEngine.Process())
{
//Display the recognized text
Console.WriteLine(ocrEngine.Text);
System.IO.StreamWriter file = new System.IO.StreamWriter(“d:\test2.txt”);
file.Write(ocrEngine.Text);
file.Close();
}
This code generate unreadable text. More or less like this:
ToppWs@$%%%%%@p*pp’00%$3VZ$$$%$$#%=$cv’nmVMWJ-V50V%@Ii-lyii-ininNoN$!c#N=39%NpN###.NNNININN.ppNNNONc#\NpppN$.NZFNNNNWNNNNNNNNNNNNWNNNNNNJNONNNNNNNNNWNNNN.ppphp%NNN#JNNNNNNNNNNNUMNNNNNUMMNNNWNNNNNWNW90%%%%J##@#p’’’’’’’’’’’‘3’’’’’’’’’’’’’’’’’’‘m’’’’’‘V’’’’‘0’‘V’’’’‘y’’’’’’’’’’’’’’‘9’’’’‘a’‘NNNNNPNNNNpNp#N$$$#N#p##N#W$###p#$%$#9#J#N###NNUNNNNWNNNWNJ9NpNNNNNNNWNNW#=9NNWN#999NNNNNNNNNNN.NNWNNNNNNNNNNNN!NNNNNN%N#p#NaNNNWNNOVV—‘w’’’’’‘0’’’’’‘a’’‘y’%’’’’‘w’’’‘a’‘i’’‘g’’’’’’’‘g’’’’’’‘m’’’’’’‘a’’’'win%v%$JT’empZ#J#$%'hp%%%%%%NNJs$'p’00N$9999’phpp’NF37NevyW$N#N#=59%3$J$35%#NNNWMNpphphp#%NNFTWONNNUJJ9999999999999%%%%%%‘ppW%$%$50%N#’$99%#$#$%#%pN$$$$30JNWFW950N$'pp$%$'phpW$39%J####33NJUNNWM#$NN3NW9NNN3#W’9990999999%9900N%'pphp#NWNWNNMMUNMVNZ$9Np$p’3Newp9N%Z$NZ$$#‘hp%############$N$9N$$N######$%#$%$5NNNMMMNNW’$$90%N$9999999905%79’00%99970pphp33%9#########%#J#%NJOJ#9#SWFN#990093%%=JuN$##p####'pphp%N#$'pph%%p####‘WNWWWW’ppN$Z##$N$%$$n’‘hm$%$$NNUMNUJWomphp%%%%N$33%NN’$909%%%N$$%#cipp’NWNWNW9999%%%%%%%%%N%999979N%J#V\V%$$V`
I am working with a .net 4.5 platform.
Thank you