Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/singka-tech/singka-hwocr
本项目集成了华为云OCR文字识别业务,支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0,由宁波晟嘉网络科技有限公司维护。
https://github.com/singka-tech/singka-hwocr
hua-wei huawei huaweicloud huaweiocr laravel ocr thinkphp thinkphp5 thinkphp51 thinkphp6
Last synced: about 1 month ago
JSON representation
本项目集成了华为云OCR文字识别业务,支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0,由宁波晟嘉网络科技有限公司维护。
- Host: GitHub
- URL: https://github.com/singka-tech/singka-hwocr
- Owner: SingKa-TECH
- License: mit
- Created: 2020-06-25T11:34:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-25T11:43:02.000Z (over 4 years ago)
- Last Synced: 2024-11-24T05:07:34.732Z (about 1 month ago)
- Topics: hua-wei, huawei, huaweicloud, huaweiocr, laravel, ocr, thinkphp, thinkphp5, thinkphp51, thinkphp6
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 华为云OCR文字识别
#### 介绍
本项目集成了华为云OCR文字识别业务,支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0,由宁波晟嘉网络科技有限公司维护。#### 安装教程
使用 `composer require singka/singka-hwocr` 命令行安装即可。
#### 使用示例(基于ThinkPHP6.0)
```php
// +----------------------------------------------------------------------
namespace app\home\controller;use SingKa\HwOcr\HwOcr;
class Index extends Base
{
/**
* OCR文字识别示例
*
* @appKey 华为云appKey
* @appSecret 华为云appSecret
* @regionName 资源所在区域
*/
public function ocrDemo()
{
$config['appKey'] = 'YXMWB********PKZY';
$config['appSecret'] = 'wC2*em*7*********EDP';
$config['regionName'] = 'cn-north-4';
//分别传入配置、OCR识别类型、图片地址或Base64码和其他参数
$result = HwOcr::AkskRequest($config, 'business-license', 'http://tuoxing.shop/ocr/data/business-license-demo.jpg', []);
return json(json_decode($result, true));
}
}
```#### 其他说明
相关材料请查阅:
[华为云文字识别](https://support.huaweicloud.com/ocr/index.html)
[SDK简介](https://support.huaweicloud.com/sdkreference-ocr/ocr_04_0016.html)
[API概览](https://support.huaweicloud.com/api-ocr/ocr_03_0047.html)作者联系方式:[email protected]