dingdayu/baidu-bce-ocr-sdk

v1.1.1 2016-11-25 06:27 UTC

This package is auto-updated.

Last update: 2024-05-07 21:03:22 UTC


README

百度云图像识别sdk(非官方)

Build Status Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality codecov.io Code Coverage Total Downloads License

使用实例

composer 安装

composer require dingdayu/baidu-bce-ocr-sdk

然后引用

require "./vendor/autoload.php";
date_default_timezone_set('UTC');

$tempfile = "./love.png";
$file_content = file_get_contents($tempfile);
$ret = \BaiduBCE\OCR::general($file_content);
var_dump($ret);

直接下载安装

前往 releases 下载最新版,并移动到对应位置!

require "./vendor/dingdayu/baidu-bce-ocr-sdk/autoload.php"; // 注意替换此处路径
date_default_timezone_set('UTC'); // 设置当前时区为UTC

$tempfile = "./love.png";
$file_content = file_get_contents($tempfile); // 读取文件,另可用fopen
$ret = \BaiduBCE\OCR::general($file_content);
var_dump($ret);

特别感谢

特别感谢思维与逻辑,根据官方的python改写失败后,在他的PHP 百度图像识别接口使用示例 才成功,后优化改写的。