@dfeidao/fd-an000004
百度智能云-港澳通行证识别
Last updated 9 months ago by taoqf .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @dfeidao/fd-an000004 
SYNC missed versions from official npm registry.

百度智能云-港澳通行证识别

Installation

yarn add --dev @dfeidao/fd-an000004

参数

参数 描述
app_id 从百度智能云申请的AppID
api_key 从百度智能云获取的ApiKey
secret_key 从百度智能云获取的Secret key
image 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式

返回值

名称 说明
address 地址
birthday 生日
card_num 港澳通行证号码
name_chn 中文姓名
name_eng 英语姓名
sex 性别
valid_date 有效期至

Example

  1. 客户端通过调用 import img2base64 from '@dfeidao/atom-web/file/img2base64'; 原子操作,把base64格式的图片传到服务端
  2. 服务端调用 @dfeidao/fd-an000004 护照识别原子操作进行识别
  3. 需要注意的是 app_id, api_key, secret_key 不要出现在客户端,仅限在服务端出现
import an004 from '@dfeidao/fd-an000004';

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders): Promise<IWebResult> {
	try {
		const img = message.img;
		const res = await an004('app_id', 'api_key', 'secret_key', message.img);
	} catch (error) {
		// 获取到具体的错误信息
		console.log(error);
	}
}

Current Tags

  • 4.6.201909271050                                ...           latest (9 months ago)

15 Versions

  • 4.6.201909271050                                ...           9 months ago
  • 4.6.201909121205                                ...           10 months ago
  • 4.6.201909041723                                ...           10 months ago
  • 4.6.201909041722                                ...           10 months ago
  • 4.6.201908121119                                ...           a year ago
  • 4.6.201908121116                                ...           a year ago
  • 4.6.201908121108                                ...           a year ago
  • 4.6.201907040923                                ...           a year ago
  • 4.6.201907021246                                ...           a year ago
  • 4.6.201907021243                                ...           a year ago
  • 4.6.201907021240                                ...           a year ago
  • 4.6.201907021237                                ...           a year ago
  • 4.6.201907021236                                ...           a year ago
  • 4.6.201907021232                                ...           a year ago
  • 4.6.201907021229                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |