百度 文字识别

下载SDK

 

使用

require_once __DIR__ . '/../../../Tools/Baidu/AipOcr.php'; 引入
$image = $request->img; 获取base64 去掉头部的图片
$res = new \AipOcr('23607144', 'QG1frZuwlofnMgnmlLiwEm6G', 'PSaxOLZfSTfVHvxrfbEMI5KG9CPonuBU');
$data = $res->idcard(base64_decode($image), 'front');

 

posted @ 2021-02-03 14:32  老阴比  阅读(90)  评论(0)    收藏  举报