kareemu3 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

tesseract getutf8text assert failed #1421

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
--------------------------------------------------------------------------
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
Pix *image;
char* kor = "customeng7";//traineddata of customeng.testfont.exp7
if (api->Init(NULL, kor)) {
   fprintf(stderr, "Could not initialize tesseract.\n");
   exit(1);
}
image=pixRead("a.jpg");//test a.jpg or b.jpg
api->SetImage(image);
char *outtext3 = api->GetUTF8Text();// api->GetUTF8Text();<<<--Here ERROR
--------------------------------------------------------------------------

What is the expected output? 
-try test a.jpg. so no error.
-try test b.jpg. so error(Error IMG : c.jpg).
  [index >= 0 && index < size_used_:Error:Assert failed:in file C:\tesseract-
  ocr\tesseract-   ocr\ccutil\genericvector.h]
  why Error? I don't no. please help me.

What do you see instead?
-correction baseapi.cpp file. try annotation GetUTF8Text() method. but unchange 
error.

What version of the product are you using? 
-using tesseract-ocr-3.02

On what operating system?
-window7 x64

Please provide any additional information below.
-I'm sorry. I'm poor at English. please help me.

p.s : my mail address -> qhstj0123@gmail.com

Original issue reported on code.google.com by qhstj0...@gmail.com on 9 Feb 2015 at 3:56

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I want no error or fail return value of GetUTF8Text() method.
My  expectation
char *outtext3 = api->GetUTF8Text();
if(outtext3 == NULL)
{
   printf("word detection fail");
}

Original comment by qhstj0...@gmail.com on 10 Feb 2015 at 3:59