Number of chars returned by OCRTesseractGetCharCount()

Discussions about machine vision support in GdPicture.
Post Reply
eagleman
Posts: 27
Joined: Mon Jan 25, 2010 1:48 pm

Number of chars returned by OCRTesseractGetCharCount()

Post by eagleman » Tue Feb 16, 2010 11:11 am

Hi,

The function OCRTesseractGetCharCount() returns a number which is less then the string length of the ocr-ed text.

What I found out is that OCRTesseractGetCharCount() returns the total number of characters without the number of spaces.
So the text "Hello there" is actually 11 chars, but OCRTesseractGetCharCount() returns 10.

Is this correct?

Please advise.

Eagleman

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Number of chars returned by OCRTesseractGetCharCount()

Post by Loïc » Tue Feb 16, 2010 12:19 pm

Hi,

The OCRTesseractGetCharCount() doesn't count spaces.
You have to use the OCRTesseractGetCharSpaces with each characters to count spaces.

With best regards,

Loïc

eagleman
Posts: 27
Joined: Mon Jan 25, 2010 1:48 pm

Re: Number of chars returned by OCRTesseractGetCharCount()

Post by eagleman » Tue Feb 16, 2010 2:22 pm

Thanks.

Eagleman

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest