Quick reply ;-): have a look at TessBaseAPIGetComponentImages. There is
python example[1] for C-API, so you could be able to follow if you are
familiar with tesseract C-API.
Just change
    tesseract.TessBaseAPISetPageSegMode(api, PSM_AUTO_OSD)
to
    tesseract.TessBaseAPISetPageSegMode(api, PSM_SINGLE_LINE)

and adjust filename and TESSDATA_PREFIX...

I got output like this:

image width: 720
image height: 36
Found 1 textline image components.
Box[0]: x=78, y=0, w=148, h=36, confidence: 89, text: downpours

[1] http://pastebin.com/DhPUgrAj

Zdenko

On Wed, Aug 12, 2015 at 5:22 PM, Anshul Maheshwari <[email protected]>
wrote:

> I checked after cropping the image, results are successfully shown.
> I gave attached image to tesseract.
>
> just now I checked manually croping image using GIMP, now I have to think
> of some algorithm.
> which can do it automatically.
>
> -Anshul
>
>
>
> On Wednesday, August 12, 2015 at 8:23:47 PM UTC+5:30, Anshul Maheshwari
> wrote:
>>
>> Hi
>>
>> I am trying to detect character from attached image, but I am unable to
>> detect it using tesseract.
>>
>> Tesseract detects fine when there is lot of data, but when there is very
>> less data means only 2 or 3 words it fails.
>>
>> It detects fine in file_5.png but fails for file_0.png and file_6.png
>>
>> 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/a5e06019-3417-4fec-b5af-390239596fc4%40googlegroups.com
> <https://groups.google.com/d/msgid/tesseract-ocr/a5e06019-3417-4fec-b5af-390239596fc4%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/CAJbzG8x8r0UPEh64TtBQSC%2BD494fUb-U9tOnu5%2BzK0rot9FfGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to