PHPackages                             whistle/baiduocr - 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. [API Development](/categories/api)
4. /
5. whistle/baiduocr

ActiveLibrary[API Development](/categories/api)

whistle/baiduocr
================

This is the baidu OCR operation API

v1.0.0(8y ago)0982Apche 2.0PHP

Since Aug 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rcj654020445/whistle)[ Packagist](https://packagist.org/packages/whistle/baiduocr)[ Docs](https://github.com/rcj654020445/whistle)[ RSS](/packages/whistle-baiduocr/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

介绍
--

[](#介绍)

这是百度AI平台的OCR工具laravel扩展包，他提供例如身份证照片识别，银行卡照片识别，文字识别、网图OCR识别、生僻字OCR识别、行驶证识别、驾驶证等其他文字识别功能。

 [![Build Status](https://camo.githubusercontent.com/6421b84c37f63d1bd1b71faa9c1d973d0950c8b3208f99329755715fd9ba34bd/68747470733a2f2f7472617669732d63692e6f72672f72636a3635343032303434352f77686973746c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rcj654020445/whistle)

install
-------

[](#install)

```
    composer require whistle/baiduocr

```

```
    php artisan vendor:publish

```

```
    在config/app.php文件中provider数组添加 whiStle\baiduOcr\BaidOcrProvider::class
    在config/app.php文件中aliases数组数组中添加'Ocr'=>whiStle\baiduOcr\AipOcrFacade::class

```

```
    配置config/ocr.php文件

```

use
---

[](#use)

```
    识别身份证
    Ocr::idcard(string $img, bool $true)

```

```
    银行卡识别
    Ocr::bankcard(string $img)

```

```
    通用文字识别(含文字位置信息)
    Ocr::general(string $img)

```

```
    通用文字识别(不含文字位置信息)
    Ocr::basicGeneral(string $img)

```

```
    网图OCR识别
    Ocr::webImage(string $img)

```

```
    生僻字OCR识别
    Ocr::enhancedGeneral(string $img)

```

```
    行驶证识别
    Ocr::vehicleLicense(string $img)

```

```
    驾驶证
    Ocr::drivingLicense(string $img)

```

```
    车牌
    Ocr::licensePlate(string $img)

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3243d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d85ccd899cd1ee07e5395191425e54f976749e6a929991c7cb9a391a93eb2428?d=identicon)[rcj654020445](/maintainers/rcj654020445)

---

Top Contributors

[![rcj654020445](https://avatars.githubusercontent.com/u/12872619?v=4)](https://github.com/rcj654020445 "rcj654020445 (5 commits)")

### Embed Badge

![Health badge](/badges/whistle-baiduocr/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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