Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 5 Jahren
Letzter Beitrag:
vor 4 Jahren, 12 Monaten
Beteiligte Autoren:
Noel Tanti, Ruben Sanchez Peña, Gianni Spano, Yogi Yang, Fabrice Harari

Tesseract / OCRtools .net or other OCR

Startbeitrag von Noel Tanti am 15.07.2013 12:51

Hi ,

I am looking to integrate an OCR into my windev app and basically the options are two

tesseract for free. has anybody implemented any of these in windev?

ocrtools . Is it possible to integrate a .net compnent (ocrtools) to windev?

any help appreciated

Regards
Noel

Antworten:

Hi. For simple jobs you can look at http://pumanet.codeplex.com/

Very free, simple to integrate with Windev.


Rubén

von Ruben Sanchez Peña - am 15.07.2013 18:24
I have tried Tesseract OCR but I had used the command line version as it is easier to use.

i would suggest you to shell from your program and execute the command line version with necessary parameters.

von Yogi Yang - am 16.07.2013 06:45
Hi Noel

FYI:
- there is an example of tesseract usage in the latest LST...
- I know, it's in french, but you can translate the whole code with 3 clicks in your UI, and the article itself shouldn't be THAT important
- also, you can buy THIS installment only from the french web site, in the LST part

so if you want to save time...

Best regards

von Fabrice Harari - am 16.07.2013 11:50
@Ruben Sanchez

Please, can you share some example written in Windev that is using the Puma.dll?

Thanks in advance.

Gianni

von Gianni Spano - am 16.07.2013 14:15
Hi. This procedure will make all the job:

PROCEDURE OCR(sFichero is string, sIdioma is string="Spanish")

//PumaLanguage
//English(PumaLanguage) = 0
//German(PumaLanguage) = 1
//French(PumaLanguage) = 2
//Russian(PumaLanguage) = 3
//Swedish(PumaLanguage) = 4
//Spanish(PumaLanguage) = 5
//Italian(PumaLanguage) = 6
//RussianEnglish(PumaLanguage) = 7
//Ukrainian(PumaLanguage) = 8
//Serbian(PumaLanguage) = 9
//Croatian(PumaLanguage) = 10
//Polish(PumaLanguage) = 11
//Danish(PumaLanguage) = 12
//Portuguese(PumaLanguage) = 13
//Dutch(PumaLanguage) = 14
//Digits(PumaLanguage) = 15
//Czech(PumaLanguage) = 19
//Romanian(PumaLanguage) = 20
//Hungarian(PumaLanguage) = 21
//Bulgarian(PumaLanguage) = 22
//Slovenian(PumaLanguage) = 23
//Lettish(PumaLanguage) = 24
//Lithuanian(PumaLanguage) = 25
//Estonian(PumaLanguage) = 26
//Turkish(PumaLanguage) = 27

sRes is string = ""
//sFichero = fexedir() + "\Test.png"
pclPumaPage is object "PumaPage" dynamic = new "PumaPage"(sFichero)
pclPumaPage.FileFormat = PumaFileFormat.TxtAnsi
pclPumaPage.EnableSpeller = True

pclPumaPage.Language = LanguageStrings.GetSupportedLanguage(pclPumaPage,sIdioma)
WHEN EXCEPTION IN
Cadena is UNICODE string = pclPumaPage.RecognizeToString()

DO
Info("La imagen no tiene texto reconocible.")
ELSE
sRes = UnicodeToAnsi(Cadena,charsetAnsi)
END


pclPumaPage.Dispose()

delete pclPumaPage

pclPumaPage = Null

RESULT sRes


A procedure for know the languages allowed (you can load the result in a drop box for example):

PROCEDURE LenguajesOCR()

//PumaLanguage
//English(PumaLanguage) = 0
//German(PumaLanguage) = 1
//French(PumaLanguage) = 2
//Russian(PumaLanguage) = 3
//Swedish(PumaLanguage) = 4
//Spanish(PumaLanguage) = 5
//Italian(PumaLanguage) = 6
//RussianEnglish(PumaLanguage) = 7
//Ukrainian(PumaLanguage) = 8
//Serbian(PumaLanguage) = 9
//Croatian(PumaLanguage) = 10
//Polish(PumaLanguage) = 11
//Danish(PumaLanguage) = 12
//Portuguese(PumaLanguage) = 13
//Dutch(PumaLanguage) = 14
//Digits(PumaLanguage) = 15
//Czech(PumaLanguage) = 19
//Romanian(PumaLanguage) = 20
//Hungarian(PumaLanguage) = 21
//Bulgarian(PumaLanguage) = 22
//Slovenian(PumaLanguage) = 23
//Lettish(PumaLanguage) = 24
//Lithuanian(PumaLanguage) = 25
//Estonian(PumaLanguage) = 26
//Turkish(PumaLanguage) = 27

sRes is string = ""

pclPumaPage is object "PumaPage" dynamic = new "PumaPage"

pclLista is object "System.Collections.Generic.iList" dynamic = LanguageStrings.GetSupportedLanguages(pclPumaPage)

FOR n = 0 TO 100
// if pclLista.get_Item(n) = null then
// break
// END
WHEN EXCEPTION IN
sTr is string = pclLista.get_Item(n)
DO
BREAK
END

IF sRes = "" THEN
sRes = sTr
ELSE
sRes += CR + sTr
END

END

pclPumaPage.Dispose()

delete pclPumaPage

pclPumaPage = Null

RESULT sRes


Rubén

von Ruben Sanchez Peña - am 18.07.2013 12:16
Thank you Ruben..

:-)

Gianni

von Gianni Spano - am 18.07.2013 15:47
Belated thanks for all your help.
Noel

von Noel Tanti - am 19.07.2013 08:23
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.