I have not attached multilines png file, because with small program as per your suggestion in previous mail. I am able to get all line in one go. My actual program ccextractor, it does not return all the lines so I assumed that problem is in my ccextractor code.
now only problem that I have is no text detected, when less number of characters are there. May be I should start new thread, if you suggest me to do so. with attached png no characters are detected. -Anshul On Wednesday, August 12, 2015 at 12:46:49 PM UTC+5:30, zdenop wrote: > > you wrote: >> >> but still output is showing not all lines in input image > > > and > >> I have attached 3 files which are not detected properly > > > but you sent one png file with word "We've"... How many lines do you > expect in it ;-) ? > > > Zdenko > > On Wed, Aug 12, 2015 at 8:56 AM, Anshul Maheshwari <[email protected] > <javascript:>> wrote: > >> 1 #include "capi.h" >> 2 #include "stdio.h" >> 3 #include "stdlib.h" >> 4 #include <allheaders.h> >> 5 >> 6 void die(const char *errstr) >> 7 { >> 8 fputs(errstr, stderr); >> 9 exit(1); >> 10 } >> 11 int main(int argc, char**argv) >> 12 { >> 13 TessBaseAPI* handle; >> 14 int ret = 0; >> 15 PIX *img; >> 16 char *text; >> 17 >> 18 if(argc < 2) >> 19 printf("usage: %s infilename\n",argv[0]); >> 20 handle = TessBaseAPICreate(); >> 21 ret = TessBaseAPIInit3(handle, NULL, "eng"); >> 22 if( ret != 0) >> 23 die("TessBaseAPIInit3"); >> 24 >> 25 if((img = pixRead(argv[1])) == NULL) >> 26 die("Error reading image\n"); >> 27 >> 28 TessBaseAPISetImage2(handle, img); >> 29 if(TessBaseAPIRecognize(handle, NULL) != 0) >> 30 die("Error in Tesseract recognition\n"); >> 31 >> 32 if((text = TessBaseAPIGetUTF8Text(handle)) == NULL) >> 33 die("Error getting text\n"); >> 34 >> 35 fputs(text, stdout); >> 36 >> 37 TessDeleteText(text); >> 38 TessBaseAPIEnd(handle); >> 39 TessBaseAPIDelete(handle); >> 40 pixDestroy(&img); >> 41 >> 42 return 0; >> 43 >> 44 } >> >> I have attached 3 files which are not detected properly >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/tesseract-ocr. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tesseract-ocr/88a9ddf6-1d77-4566-8b68-0140f4148bfe%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tesseract-ocr/88a9ddf6-1d77-4566-8b68-0140f4148bfe%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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/733fd33f-b941-46ae-98c9-f2b237a32489%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

