At last I came up with result Iterator
//TessResultRenderer* result = TessTextRendererCreate("stdout");
//tess_ret = TessBaseAPIProcessPage(ctx->api, pix, 0, NULL, NULL,
0, result);
tess_ret = TessBaseAPIProcessPage(ctx->api, pix, 0, NULL, NULL, 0,
NULL);
if( tess_ret == FALSE)
printf("\nsomething messy\n");
TessResultIterator *iter = TessBaseAPIGetIterator(ctx->api);
//text_out = TessBaseAPIGetUTF8Text(ctx->api);
text_out = TessResultIteratorGetUTF8Text(iter,0);
mprint("----> %s\n",text_out);
It has even better results but don't know whether this is right way, the
author has in his thoughts for Result Iterator.
On Tuesday, August 11, 2015 at 4:08:58 PM UTC+5:30, Anshul Maheshwari wrote:
>
> Hello
>
> I am worked on OCR of subtitles of ccextractor which was working fine with
> 3.02,
> I moved to newer version of Tesseract 3.04 where I found that processpage
> api no longer return char* string
> rather it uses some result render API to give output.
>
> I am unable to get char* from result renderer, Please help to find the
> text processed by processpage.
>
> I dont want to write to file and then read back in my program.
>
> Thanks
> Anshul Maheshwari
>
--
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/a102feee-9515-40ee-971f-d0f021e9a02a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.