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]>
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].
> 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/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/CAJbzG8yNbhpVT9BCUfZ%2B8EfZaYeiUSsOY-ncoMxiVywJ9i2HLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to