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
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:
Very free, simple to integrate with Windev.
Rubén
von Ruben Sanchez Peña - am 15.07.2013 18:24
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
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
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
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
:-)
Gianni
von Gianni Spano - am 18.07.2013 15:47
Noel
von Noel Tanti - am 19.07.2013 08:23