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 : Thursday, November 9, 2006 11:40:36 PM(UTC)

Squark  
Squark

Groups: Registered
Posts: 11


Hi

I need to scan images (png) with german and french text. It works well with the VB.net OCR Sample Project and also with my own project which uses the leadtools libs. But sadly the special Characters like ä, ö, ü, è, é etc. ar not reconized. They where interpreted as "u" or "ii" but never how the should. To set the SpellLanguageID to german or french has now effect.

What do I have to do to fix this issue? Can it be solved by use a highter resolution? The images used are 72dpi and the font has about 12px...

Secondly
Is it possible to write the *.RDF File into memory instead of using the file System? I need to run my application without the rights to write to the disc.

Thanks a lot for your help!

 

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 : Friday, November 10, 2006 9:12:29 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


1.
Most likely it is the resolution.  It is recommended that you use images with a resolution of 300 DPI, no more and no less.  If the images are less than or greater than 300 DPI, the results can start to degrade.  Note that this is not the case for all images, but on average, 300 DPI is optimal.

2.
You cannot write the RDF file to memory.  Additionally, the OCR engine must utilize the file system to write temporary files.
 
#3 Posted : Monday, November 13, 2006 12:00:42 AM(UTC)

Squark  
Squark

Groups: Registered
Posts: 11


Ok, I tried it with a resolution of 300 DPI, but it still don't works.

I used the VB.net 1.1 OCR Demo Project (02 VB.NET OCR Demo Project (VS 2003)) and the sample image you find in the attachement of this post.
I tried other file formats such as png and tiff --> no effect
Setting the reconize language to german or french --> no effect
Enabling "Correction Mode" and/or "Checking Subsystem" --> no effect

Any idea what I'm doing wrong?

Thx for your help!

____________________________________________________________________________________

Result:
Es war einmal eine Witwe, die hatte zwei Tochter: die Altere glich ihr so sehr in ihrem Wesen und in
ihrem AuReren, daR man bei ihrem Anblick die Mutter zu sehen glaubte. Beide waren sie so widerwartig
und so hochmutig, daR man nicht mit ihnen auskommen konnte. Die jungere dagegen war in ihrer
Sanftmut und Freundlichkeit das wahre Ebenbild ihres Vaters; daruber hinaus war sie eines der
schonsten Madchen, das man sich denken konnte. Wie man nun gemeinhin sein Ebenbild liebt, so war
diese Mutter ganz vernarrt in ihre altere Tochter und hegte gleichzeitig eine tiefe Abneigung gegen die
jungere. Sie lief sie in der Kirche essen und ohne UnterlaR arbeiten.

  II etait une fois une veuve qui avait deux filles: I'ainee lui ressemblait si fort d'humeur et de visage, que,
qui la voyait, voyait la mere. Elles etaient toutes deux si desagreables et si orgueilleuses, qu'on ne
pouvait vivre avec elles. La cadette, qui etait le vrai portrait de son pere pour la douceur et I'honnetete,
etait avec cela une des plus belles filles qu'on eut su voir. Comme on aime naturellement son semblable,
cette mere etait folle de sa fille ainee, et, en meme temps avait une aversion effroyable pour la cadette.
Elle la faisait manger a la cuisine et travailler sans cesse.

Nachdem die gute Frau getrunken hatte, sagte sie zu ihr: »Ihr seid so schon und so gut und so
freundlich, daR ich Euch gern ein Geschenk machen mochte. (Es war namlich eine Fee, die die Gestalt
einer armen Bauerin angenommen hatte, um zu prufen, wie weit die Freundlichkeit des jungen
Madchens ginge.) Ich verleihe Euch die Gabe«, fuhr die Fee fort, »daR bei jedem Wort, das ihr sprecht,
eine Blume oder ein Edelstein aus Eurem Munde fallt.«

  La bonne femme, ayant bu, lui dit: „Vous etes si belle, si bonne et si honnete, que je ne puis
m'empecher de vous faire un don; car c'etait une feee qui avait pris le forme d'une pauvre femme de
village, pour voir jusqu'ou irait I'honnetete de cette jeune fille. Je vous donne pour don, poursuivit la fee,
qu'a chaque parole que vous direz, il vous sortira de la bouche ou une fleur, ou une pierre precieuse. „

Squark attached the following image(s):
ocr_test_sample1.gif
 
#4 Posted : Monday, November 13, 2006 4:25:37 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Please post an image that is 300 DPI.  The GIF you sent is only 150.
 
#5 Posted : Monday, November 13, 2006 4:53:21 AM(UTC)

Squark  
Squark

Groups: Registered
Posts: 11


Sorry, i did not notice that Photoshop converts gifs to a 96 dpi file...

Ok, here's now the sample in png format. The font is set to 12pt. Is that ok, or shoult it be more?

Squark attached the following image(s):
ocr_test_sample1.png
 
#6 Posted : Monday, November 13, 2006 5:48:26 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Make sure that you are setting the language.  I had no problems recognizing the special characters, attached is a PDF I created with the VB.NET 2003 demo.  Go to the menu bar and select Language -> Select Language... and then select German from the list.  When recognizing, make sure you change your Spell Language to German as well.  This gave me the results attached.

Here's an example in code that i used:

leadOcr.SpellLanguageID = RasterOcrLanguage.German
Dim languages(1) As RasterOcrLanguage
languages(0) = RasterOcrLanguage.German
leadOcr.SelectLanguages(languages)

At first the sample project I had was not recognizing them either, but after adding this code, more specifically the last 3, it worked.  It isn't enough to just set the Spell Language or just the languages, you must do both.
File Attachment(s):
test.zip (31kb) downloaded 32 time(s).
 
#7 Posted : Monday, November 13, 2006 6:17:14 AM(UTC)

Squark  
Squark

Groups: Registered
Posts: 11


Now it works! Thanks a lot!

I did not set the global language (Menu Language), and in my code i did it the other way wrong ;-). Maybe I should look for eyeglasses, I simply did not see the menu "language"...

Thanks for your help!

 
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.241 seconds.