Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 19, 2006 9:03:37 AM(UTC)
Ozymandias76

Groups: Registered
Posts: 15


I have a requirement in the application I'm writing to show the OCR recognition confidence for an entire field (typically should be 1 word, but not necessarily), or zone to use the LeadTools idiom, as a percentage. 

I'm not sure how I can go about doing this.  For a given character the confidence value seems to range anywhere from 0 to at least 200+.  How can this be translated into a percentage?  Also, I notice that in the documentation the value of 64 is recommend to be used as a threshold for high confidence.  How is this value derived at? 

Furthermore, I don't see any relationship between the RasterOcrRecognizedWords and RasterOcrRecognizedCharacters objects.  How can I tell what characters go with what word and which words have the high confidence.  The documentation states that the highest bit in the RasterOcrRecognizedCharacters.Confidence value represents whether the word has high confidence but if I can't tie the characters to any given word what good does this do me?

I really find this whole confidence system to be convoluted and illogical.  Ideally, I'd expect the RasterOcrRecognizedWord object to have its own confidence property and a property that contains the RasterOcrRecognizedCharacters (each with their own confidence properties) that make up that word.  The confidence value properties should be logical, such as a percentage.  It seems that there was an attempt to make it percentage based but I don't understand it.

Lastly, any recommendation on the best way to aggregate the confidences from the entire zone's characters/words into a single confidence percentage level? 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, December 20, 2006 6:08:47 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)






First, how characters are related to words:

Every character has a flag that indicates whether it is in the middle of a word
or not. If it is a end-of-word character, for example, this character and all previous ones (before a different break) are grouped into one word.
If you want to know which characters are part of which word,
you can check the rectangle of the character to see if it is inside the rectangle of the word.




The high bit is not about the character itself, but about
its presence in a word. This means if the high bit for a group of characters is 1, the word comprising them is high-confidence.


The rest of the bits are supposed to be from 0 to 100. The
value 64 is from the OCR engine documentation by ScanSoft. The engine authors specified it, not LEAD.

 
#3 Posted : Wednesday, December 20, 2006 10:26:15 AM(UTC)
Ozymandias76

Groups: Registered
Posts: 15


Thanks for the reply. 

I hadn't noticed the RasterOcrRecognizedCharacters.Flags property.

Also, to clarify, the documentation states that the word is "uncertain" if the high bit is 1 and that in the 0 to 100 range a zero has high-confidence (Another instance of being a tad counter-intuitive  The value is more akin to a measure of the letter's lack of confidence). 


 
#4 Posted : Friday, February 9, 2007 4:42:30 AM(UTC)

MychaL  
MychaL

Groups: Registered
Posts: 10


 Ozymandias76 wrote:
Furthermore, I don't see any relationship between the RasterOcrRecognizedWords and RasterOcrRecognizedCharacters objects.  How can I tell what characters go with what word and which words have the high confidence.  The documentation states that the highest bit in the RasterOcrRecognizedCharacters.Confidence value represents whether the word has high confidence but if I can't tie the characters to any given word what good does this do me?


In the same idea, i didn't find a way to link SectionName from Zone to RecognizeWord.
How to work with specific zone ?

I see there is Recognizewordzone index, but that suppose we know this index in our parser...
We can imagine a program which create different template for a OCR process, maybe the order for creating the zone will not the same but a same SectionName can be handled for one area. How to get the good words after ?


Any idea ?
Thx

ps : sorry for my poor english

 
#5 Posted : Monday, February 12, 2007 5:41:37 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


You can do this as follow:




1. Use the GetZonesCount method to loop through the Zones in the scanned document, loop from 0 to ZoneCount -1
2. Use the GetZone method inside the loop to get the Zone data.
3. Use the zoneData.SectionName to get the Zone Data
SectionName for each zone, and this will let you know which index corresponds to which section name.

 
#6 Posted : Monday, February 19, 2007 3:40:17 AM(UTC)

MychaL  
MychaL

Groups: Registered
Posts: 10


Yeah, already found that too....

But anyway too bad  we cant access directly to result's zone, we have to do it by yourself.
That should have been intuitively to ocerize just the zone we need, OR to get recognizewords list by "Section Name" parameter
 
#7 Posted : Wednesday, February 21, 2007 7:48:36 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)








One way to OCR a specific zone in a scanned image if there are multiple zones defined is:
1. Save the zone information into a temporary zone data file.
2. Delete all Zones except the one you need.
3. Recognize the Image you have.
4. Restore the information by loading the zone data file.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.150 seconds.