图像OCR识别
命令说明
对指定图像进行OCR识别,调用时需要访问互联网
命令原型
sText = GoogleOCR.ImageOCR(sFileName, sApiKey)
命令参数
参数 | 必选 | 类型 | 默认值 | 说明 |
---|---|---|---|---|
sFileName | True | path | C:\Users | 被识别的图片路径,支持jpeg、png、gif、bmp、webp、raw、ico格式,图片大小必须小于20M |
sApiKey | True | string | 空字符串 | 请从Google Cloud Platform上的 Credentials 中复制 API Key |
返回结果
sText,将命令运行后的结果赋值给此变量
运行实例
/*********************************图像OCR识别*********************************
命令原型:
sText = GoogleOCR.ImageOCR(sFileName, sApiKey)
入参:
sFileName--识别图片。注:被识别的图片路径,支持jpeg、png、gif、bmp、webp、raw、ico格式,图片大小必须小于20M
sApiKey--API Key。注:请从Google Cloud Platform上的 Credentials 中复制 API Key
出参:
无
注意事项:
无
********************************************************************************/
sText = GoogleOCR.ImageOCR(sFileName, sApiKey)