BTW, is almost no difference between debug and release with RAM occupied 
(few MB).

On Thursday, June 20, 2019 at 2:02:12 PM UTC+3, _ Flaviu wrote:
>
> I am using tesseract 4 on a VC++ (MFC) app, to read text from images (A4 
> sizes). I noticed that while I using this app on several PCs (Win10 64 bit, 
> *GB RAM), the RAM occupied by my app (that use tesseract) is increasing on 
> and on. If I read 14 images, my app eat 470 MB, and if I didn't close the 
> app and read again all these 14 images, the RAM eaten by my app is 
> increasing until ~800MB, and if continue to read the same images, the RAM 
> is increasing on an on. Why is this happen ?
>
> Here is the code that I am using for tesseract:
>
> BOOL CMyClass::GetTextFromImage()
> {
> PIX* pix = NULL;
> tesseract::TessBaseAPI* pTess = new tesseract::TessBaseAPI;
>
> do
> {
> if (pTess->Init(...))
> {
> m_sError.Format(_T("OCRTesseract: Could not initialize tesseract."));
> break;
> }
> // setup
> // read image
> PIX* pix = pixRead(m_sFileName);
> if (! pix)
> {
> break;
> }
> // recognize
> pTess->SetImage(pix);
> }
> while (FALSE);
>
> // cleanup
> // pTess->Clear();
> // pTess->End();
> delete pTess;
> pTess = NULL;
> pixDestroy(&pix);
>
> return TRUE;
> }
>
>
> Is there anything wrong here ? Why is increasing RAM while I am using 
> tesseract ?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/d0cb1271-7e76-49fc-9613-553f7b0b3821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to