huaweichenai / baidu-discern
Baidu realizes picture recognition text package(百度实现图片识别文字包)
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
This package is auto-updated.
Last update: 2024-12-18 18:08:53 UTC
README
Installation
composer require huaweichenai/baidu-discern
Usage
Configuration:
配置文件添加组件 :
'aipImg' => [
'class' => 'huaweichenai\discern\AipOcr',
'appId' => '百度文字App ID',
'apiKey' => '百度文字 API Key',
'secretKey' => '百度文字 Secret Key',
],
use:
$client = Yii::$app->aipImg;
$image = file_get_contents('图片地址');
$content = $client->basicAccurate($image);