Missing methods in GdPicture14

Discussions about Tesseract OCR integration in GdPicture.
Post Reply
pkazakov
Posts: 1
Joined: Wed Mar 28, 2018 5:03 pm

Missing methods in GdPicture14

Post by pkazakov » Wed Mar 28, 2018 5:21 pm

Hello, I'm migrating my app to use GdPicture14 from using GdPicture12.

Some old methods of GdPictureImaging can't be found.
Could you please tell how API changed to migrate my OCR logic intact?
My faulty code is here:

Code: Select all

                using (var gdPictureImaging = new GdPictureImaging())
                {
                    var context = OCRContext.OCRContextDocument

                    gdPictureImaging.OCRTesseractSetOCRContext(context);
                    gdPictureImaging.ResetROI();
                    gdPictureImaging.OCRTesseractReinit();
                    gdPictureImaging.OCRTesseractSetPassCount(1);

                    var content = gdPictureImaging.OCRTesseractDoOCR(_nativeImage, lang, _dictionaryPath, string.Empty);

                    return content;
                }
These methods in no longer present in GdPictureImaging class:
OCRTesseractSetOCRContext(context);
OCRTesseractReinit();
OCRTesseractSetPassCount(1);
OCRTesseractDoOCR(_nativeImage, lang, _dictionaryPath, string.Empty);

User avatar
Loïc
Site Admin
Posts: 5601
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Missing methods in GdPicture14

Post by Loïc » Thu Mar 29, 2018 6:47 pm

Hello,

You need to use the dedicated GdPictureOCR class providing a more featured interface. The documentation offers complete examples of usage for each method so you should be able to make the migration very quickly. In case you are encountering any problem feel free to open a ticket to the helpdesk.

Cheers,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests