$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->general();
if($res->success()){
var_dump($res->toArray());
}else{
var_dump($res-->getErrMsg());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->idcard([
'card_type' => 0 //0表示正面 1表示反面
]);
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->driverlicense([
'type' => 0 //0-行驶证识别 1-驾驶证识别
]);
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->bizlicense();
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->creditcard();
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->handwriting();
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->plate();
if($res->success()){
var_dump($res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->ocr()->path($path)->bc();
if($res->success()){
var_dump($res->toArray());
}