I'm downloaded the trial version of GDPicture.NET to processe images and I would like to rotate scanned images and crop them to reduce the images size.
I would like to use the OCRTesseractGetOrientation function, but it doesn't seems to work : here's my code :
Code: Select all
gdPI.OCRTesseractReinit();
gdPI.OCRTesseractClear();
gdPI.OCRTesseractSetPassCount(2);
string sOCR = gdPI.OCRTesseractDoOCR(m_CurrentImage, GdPicture.TesseractDictionary.TesseractDictionaryFrench, @"C:\Program Files\GdPicture.NET\Redist\OCR\","abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
RotateFlipType Rotate = gdPI.OCRTesseractGetOrientation(m_CurrentImage, GdPicture.TesseractDictionary.TesseractDictionaryFrench, @"C:\Program Files\GdPicture.Net\Redist\");
gdPI.Rotate(m_CurrentImage, Rotate);
I assume that using DoOCR isn't really usefull, but it doen't work anyway (with or without). When i debug, VC# says that Rotate's value is RotateNoneFlipNone, but the picture is effectively crooked. So what did I do wrong? (I used the same serial number for the Tesseract Plugin than for GdPicture. Is that a real problem?)
Thank you very much for your answers.