An open API service indexing awesome lists of open source software.

https://github.com/javakam/verifycodeidentify

tess4J自动识别图片中的验证码样例
https://github.com/javakam/verifycodeidentify

java tess4j tess4jdemo

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 自动识别图片中的验证码
tess4j

## 效果
![](https://raw.githubusercontent.com/javakam/VerifyCodeIdentify/main/src/main/resources/img/vc_4043.png)

🍎识别结果为 4043

![](https://raw.githubusercontent.com/javakam/VerifyCodeIdentify/main/src/main/resources/img/vc_8505.png)

🍎识别结果为 8505

## 样例
1. 引入
```xml

net.sourceforge.tess4j
tess4j
4.5.3

```

2. 使用说明
http://tess4j.sourceforge.net/usage.html

## BUG

1. Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.

```java
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());
```