PHPackages                             xueyuan/ocr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xueyuan/ocr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xueyuan/ocr
===========

Tencent Ocr

04PHP

Since Dec 25Pushed 7y agoCompare

[ Source](https://github.com/lixueyuanac/ocr)[ Packagist](https://packagist.org/packages/xueyuan/ocr)[ RSS](/packages/xueyuan-ocr/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

 ocr
=====

[](#-ocr-)

 Tencent Ocr.

Installing
----------

[](#installing)

```
$ composer require xueyuan/ocr -vvv
```

config
------

[](#config)

1.在使用本扩展之前，你需要去 腾讯云 注册账号，然后创建应用，获取应用的 appid,secret\_id,secret\_key,bucket。 2.仔细阅读腾讯ocr api

Usage
-----

[](#usage)

此扩展包依赖于 guzzlehttp/guzzle

1. 普通安装 直接初始化

    ```
    $factory = new Factory(["appid"=>'','secret_id'=>'','secret_key'=>'','bucket'=>'']);
    // 支持的类型有idcard businesscard drivinglicence plate bankcard bizlicense general handwriting
    $result = $factory->make('idcard');

    ```
2. laravel

    > 1. ServicePrivider 参考laravel容器

    ```
      $ocr = app(\Xueyuan\Ocr\Ocr::class)->make('idcard');
      return $ocr->recognition(0,'application/json',['http://i3.qhimg.com/t0148d78bd495777810.jpg']);

    ```

    > 2. Facade 参考laravel 门面

    ```
      use Xueyuan\Ocr\Facades\Ocr;
      $ocr = Ocr::make('idcard');

    ```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/xueyuan/ocr/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/xueyuan/ocr/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27272788?v=4)[lixueyuanac](/maintainers/lixueyuanac)[@lixueyuanac](https://github.com/lixueyuanac)

---

Top Contributors

[![lixueyuanac](https://avatars.githubusercontent.com/u/27272788?v=4)](https://github.com/lixueyuanac "lixueyuanac (8 commits)")

### Embed Badge

![Health badge](/badges/xueyuan-ocr/health.svg)

```
[![Health](https://phpackages.com/badges/xueyuan-ocr/health.svg)](https://phpackages.com/packages/xueyuan-ocr)
```

###  Alternatives

[netzmacht/contao-leaflet-maps

Contao Leaflet maps integration

1111.0k1](/packages/netzmacht-contao-leaflet-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
