hi Zdenko
I run the basic example code of bellow :
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
int main()
{
char *outText;
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);
}
// Open input image with leptonica library
Pix *image = pixRead("/usr/src/tesseract/testing/phototest.tif");
api->SetImage(image);
// Get OCR result
outText = api->GetUTF8Text();
printf("OCR output:\n%s", outText);
// Destroy used object and release memory
api->End();
delete [] outText;
pixDestroy(&image);
return 0;
}
but it raised error for me... could u help me ?
I've even set the TESSDATA_PREFIX environment variable to "usr/local/share/"
On Sunday, May 20, 2018 at 5:21:45 PM UTC+4:30, zdenop wrote:
>
> Did you read wiki before posting? E.g.
> https://github.com/tesseract-ocr/tesseract/wiki/APIExample#getcomponentimages-example
>
> Zdenko
>
--
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/c19006b7-e69d-49d8-b07c-dceef507686b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.