跳到主要内容

获取卡证类型

命令说明

获取通用卡证识别结果中的卡证类型

命令原型

sRet = Mage.ExtractCardType(jsonRet)

命令参数

参数必选类型默认值说明
jsonRetTrueexpressionjsonRet使用"屏幕卡证识别"、"图像卡证识别"命令输出到的变量。如是"PDF卡证识别"命令输出到的变量,则需使用遍历数组的值

返回结果

sRet,将命令运行后的结果赋值给此变量。

运行实例

/**********************获证卡证类型**********************
命令原型:
sRet = Mage.ExtractCardType(jsonRet)
入参:
jsonRet--卡证识别结果
出参:
sRet--函数调用的输出保存到的变量
****************************************************/
Rem 测试数据
Dim jsonRet={"ai_function" : "ocr_card","msg_id" : "13c26ea253363b8529ad72d90aa114e0","page_number" : 1,"result" : {"image_angle" : 0,"img_id" : "c7pa5npr8eh8o888obp0","items" : [],"rotated_image_height" : 842,"rotated_image_width" : 594,"type" : 20,"type_description" : "其它","type_key" : "other"}} // 测试数据
Dim sRet="" // 输出结果

sRet = Mage.ExtractCardType(jsonRet)
TracePrint(sRet)

可视化样例