Please rebuild leptonica with the latest source from github ( https://github.com/DanBloomberg/leptonica) and then rebuild tesseract with the latest source from github ( https://github.com/tesseract-ocr/tesseract) and try.
ShreeDevi ____________________________________________________________ भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com On Thu, Dec 29, 2016 at 5:38 AM, 송민규 <song600...@gmail.com> wrote: > How should Vs2015 solve this problem ? > Too many Error... > > It looks like the pixRead function found the file "a.png" in C: \ datas, > why does pixRead return a NULL value? > > OS : Windows 10 pro > IDE tool : visual studio 2015 update 3 > Teseract - ocr version link : https ://github.com/tesseract-ocr/tesseract > (Tesseract Open Source OCR Engine(main repository)) > leptonica version : 1.74.0 > > #include <allheaders.h> > #include <baseapi.h> > #include > > int main() > > { > char * outText = nullptr; > Pix *image = nullptr; > > tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); > // Initialize tesseract-ocr with English, without specifying tessdata path > if (api->Init(NULL, "eng")) { > fprintf(stderr, "Could not initialize tesseract.\n"); > exit(1); > } > > > > image = pixRead("C:\\datas\\a.tif"); > api->SetImage(image); > // Get OCR result > outText = api->GetUTF8Text(); > printf("\n OCR output: %s \n", outText); > > // Destroy used object and release memory > api->End(); > delete[] outText; > pixDestroy(&image); > > return 0; > > } > > Output: > /********************************************************************/ > Error in pixReadStreamPng : function not present > Error in pixReadStream : no fix returned > Error in pixRead : pix not Read > Error in pixGetDimensions : pix not defined > Error in pixGetColormap : pix not defined > Error in pixGetCopy : Pixs not defined > Error in pixGetDepth : pix not defined > Error in pixGetWpl : pix not defined > Error in pixGetYRes : pix not defined > Error in pixGetClone : Pixs not defined > > Please call SetImage before attempting recognition. > > -- > 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 tesseract-ocr+unsubscr...@googlegroups.com. > To post to this group, send email to tesseract-ocr@googlegroups.com. > 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/2afe5d49-c370-4d63-a54e-045ca04fcfb1% > 40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/2afe5d49-c370-4d63-a54e-045ca04fcfb1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. 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/CAG2NduWoF%2BQf0j4Ajq%3DER48GMvoR7oXoSsdZ-LPJg9%2BuZvE0uQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.