Skip to content

javakam/VerifyCodeIdentify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

自动识别图片中的验证码

tess4j

效果

🍎识别结果为 4043

🍎识别结果为 8505

样例

  1. 引入
<!-- https://mvnrepository.com/artifact/net.sourceforge.tess4j/tess4j -->
<dependency>
    <groupId>net.sourceforge.tess4j</groupId>
    <artifactId>tess4j</artifactId>
    <version>4.5.3</version>
</dependency>
  1. 使用说明 http://tess4j.sourceforge.net/usage.html

BUG

  1. Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
ITesseract instance = new Tesseract();  // JNA Interface Mapping
//In case you don't have your own tessdata, let it also be extracted for you
File tessDataFolder = LoadLibs.extractTessResources(DEST);
//Set the tessdata path
instance.setDatapath(tessDataFolder.getAbsolutePath());

About

tess4J自动识别图片中的验证码样例

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages