class OCR

Tencent AI OCR 能力.

Traits

Image
OCR

Constants

BASE_URL

ID_CARD

BUSINESS_CARD

DRIVE

BIZ

CREDIT_CARD

GENERAL

PLATE

HAND_WRITING

Methods

array
idCard(string|SplFileInfo $image, bool $front = true)

身份证识别.

mixed
businessCard(mixed $image)

名片识别.

array
driverLicense(mixed $image)

驾驶证识别.

array
drivingLicense(mixed $image)

行驶证识别.

mixed
bizLicense(mixed $image)

营业执照识别.

mixed
creditCard(mixed $image)

银行卡识别.

mixed
general(mixed $image)

通用识别.

mixed
plate($image, bool $isUrl = false)

车牌 OCR.

mixed
handwriting($image, bool $isUrl = false)

手写体 OCR.

Details

at line 48
array idCard(string|SplFileInfo $image, bool $front = true)

身份证识别.

Parameters

string|SplFileInfo $image 支持 JPG、PNG、BMP 格式
bool $front 正面为 true

Return Value

array

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/ocridcardocr.shtml

at line 68
mixed businessCard(mixed $image)

名片识别.

Parameters

mixed $image 支持 JPG、PNG、BMP 格式

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/ocrbcocr.shtml

at line 101
array driverLicense(mixed $image)

驾驶证识别.

Parameters

mixed $image 支持 JPG PNG BMP 格式

Return Value

array

Exceptions

TencentAIException

at line 115
array drivingLicense(mixed $image)

行驶证识别.

Parameters

mixed $image 支持 JPG PNG BMP 格式

Return Value

array

Exceptions

TencentAIException

at line 131
mixed bizLicense(mixed $image)

营业执照识别.

Parameters

mixed $image 支持 JPG PNG BMP 格式

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/ocrbizlicenseocr.shtml

at line 147
mixed creditCard(mixed $image)

银行卡识别.

Parameters

mixed $image 支持 JPG PNG BMP 格式

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/ocrcreditcardocr.shtml

at line 163
mixed general(mixed $image)

通用识别.

Parameters

mixed $image 支持 JPG PNG BMP 格式

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/ocrgeneralocr.shtml

at line 180
mixed plate($image, bool $isUrl = false)

车牌 OCR.

Parameters

$image
bool $isUrl 图片是否为网络地址 url

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/plateocr.shtml

at line 197
mixed handwriting($image, bool $isUrl = false)

手写体 OCR.

Parameters

$image
bool $isUrl 图片是否为网络地址 url

Return Value

mixed

Exceptions

TencentAIException

See also

https://ai.qq.com/doc/handwritingocr.shtml