Coder Social home page Coder Social logo

how use setup.php? about imageocr HOT 8 CLOSED

cong520 avatar cong520 commented on August 15, 2024
how use setup.php?

from imageocr.

Comments (8)

mohuishou avatar mohuishou commented on August 15, 2024

请看最新的代码,example文件夹里面,可以直接运行study.php或者index.php

from imageocr.

mohuishou avatar mohuishou commented on August 15, 2024

链接是以前用来测试的,现在无效了,最新的代码里面使用了自动生成的方法,应该没有这个错误

from imageocr.

cong520 avatar cong520 commented on August 15, 2024

不太理解这个要怎么用,我把composer require mohuishou/image-ocr 生成的文件放在tp5的vendor,把image-ocr改名为ImageOCR。
控制器中
public function index()
{
vendor('Mohuishou.ImageOCR.Image');
$image=new \Mohuishou\ImageOCR\Image("http://auto.test.com/sss.png");
$a=$image->find();
$code=implode("",$a);
echo "验证码:$code \n";}
然后报
致命错误: Class 'Mohuishou\ImageOCR\StorageFile' not found
//从数据库中取出特征值
$db=new StorageFile();

from imageocr.

cong520 avatar cong520 commented on August 15, 2024

直接在根目录用composer require mohuishou/image-ocr,然后访问http://auto.testv.com/vendor/mohuishou/image-ocr/
也会报路径错误,里面命名空间都是Mohuishou\ImageOCR\Example ,我要怎么来安装合适呢

from imageocr.

cong520 avatar cong520 commented on August 15, 2024

可以给个步骤吗?放到TP5上或者直接在根目录,我下载example里面的文件。composer 后运行也是各种路径错误

from imageocr.

mohuishou avatar mohuishou commented on August 15, 2024

不太清楚tp5的逻辑,你可以先git clone项目到本地,然后composer install,然后试试进入本地文件夹运行php -S localhost:8080,看看示例能不能运行,然后具体使用的时候可以参考example来写,因为每个验证码识别的参数和步骤都要进行一定的调整,所以具体逻辑需要自己完善

from imageocr.

cong520 avatar cong520 commented on August 15, 2024

可以运行了,我再研究研究适配的。谢谢哈,开发这个好东西。 有些1个字母会变成几个数字 这个情况应该可以判断下位数

from imageocr.

mohuishou avatar mohuishou commented on August 15, 2024

没事,这个具体的参数是要调整的

from imageocr.

Related Issues (20)

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.