GithubHelp home page GithubHelp logo

imageocr's Introduction

ImageOCR

php验证码识别

安装

composer require mohuishou/image-ocr

初始化

  1. 检查db文件夹是否存在且有写入权限
  2. 使用前请先运行study.php,为识别建立特征库,特征库越多,识别率越高,运行时间越久
  3. 使用前请先根据个人需要更改下面常量的值
    //标准化的图像的宽高信息,可调
    const HASH_W = 10;
    const HASH_H = 10;

    //图像字符串的个数
    const CHAR_NUM=4;

运行

//注意,这里的图片,如果是url验证码的话,请先将其保存下来,因为一般url每一次get的时候图像会被重新生成
$image=new \ImageOCR\Image("./img/inImgTemp.png"); 
$a=$image->find();

debug

$image->draw(); //将会把接收到的图像,去除干扰之后,点阵画的输出

CHANGELOG

0.1 [2016-10-7]

  1. 默认模板保存方式由数据库改为文件,保存路径为./db/db.json
  2. 使用composer安装

imageocr's People

Contributors

mohuishou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.