RecognizeBirthCertification_文字识别_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

本接口适用场景

  • 阿里云出生证明识别,是阿里云官方自研 OCR 文字识别产品,适用于识别出生证明所包含的新生儿姓名、性别、出生日期、出生地点等关键信息的场景。
  • 阿里云 OCR 产品基于阿里巴巴达摩院强大的 AI 技术及海量数据,历经多年沉淀打磨,具有服务稳定、操作简易、实时性高、能力全面等几大优势。
  • 本接口图片示例

本接口核心能力

分类概述
图片格式支持 PNG、JPG、JPEG、BMP、GIF、TIFF、WebP。
图像增强默认支持图像增强,包括图像自动旋转、畸变自动矫正、模糊图片自动增强等能力。
多类型覆盖支持模糊、光照不均、透视畸变、任意背景等低质量图像识别。
高精度识别总体识别准确率可达 98%。

如何使用本接口

步骤概述
1开通 个人证照识别 服务。开通服务前后,您可以通过体验馆免费体验本功能识别效果。
2购买出生证明识别资源包。本 API 会赠送免费额度,可使用免费额度测试。您也可以不购买资源包,系统会通过“按量付费”方式按实际调用量自动扣款。
3可以参照调试页面提供的代码示例完成 API 接入开发。接入完成后,调用 API 获取识别结果。如果使用子账号调用接口,需要阿里云账号(主账号)对 RAM 账号进行授权。创建 RAM 用户的具体操作,请参考:创建 RAM 用户。文字识别服务提供一种系统授权策略,即 AliyunOCRFullAccess。具体授权操作,请参见在用户页面为 RAM 用户授权。

重要提示

类型概述
图片格式
  • 本接口支持:PNG、JPG、JPEG、BMP、GIF、TIFF、WebP。暂不支持 PDF 格式。
图片尺寸
  • 图片长宽需要大于 15 像素,小于 8192 像素。
  • 长宽比需要小于 50。
  • 如需达到较好识别效果,建议长宽均大于 500px。
图片大小
  • 图片二进制文件不能超过 10MB。
  • 图片过大会影响接口响应速度,建议使用小于 1.5M 图片进行识别,且通过传图片 URL 的方式调用接口。
相关能力

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ocr:RecognizeBirthCertification
Write
全部资源
*

请求参数

字段名称字段详情
Urlstring
  • 本字段和 body 字段二选一,不可同时透传或同时为空。展开详情
示例值:https://img.alicdn.com/imgextra/i1/O1CN01CDyq1720fG7YUoHtb_!!6000000006876-0-tps-6000-4500.jpg字符长度 <= 2048
bodystring<binary>
  • 本字段和 URL 字段二选一,不可同时透传或同时为空。展开详情
示例值:图片二进制文件

返回参数

字段名称字段详情
RequestIdstring

请求唯一 ID

示例值:43A29C77-405E-4CC0-BC55-EE694AD00655
Datastring

返回数据

示例值:{ "Data": "{\"algo_server\":[\"ocr_doctype_v9963/prism?src=test&op=doctype&pro=basic,rotate,split_kv_server&scene=multi_invoice&requestid=920B9469-013E-5FF2-9034-AD1EDECF21BF\",\"ocr_tail_card_v9827/prism?src=sub_img_json&op=birth_certification&pro=basic,qrcode,key_eng,split_kv_server&requestid=920B9469-013E-5FF2-9034-AD1EDECF21BF\"],\"algo_version\":\"5d7591fa64b2e4a91d08b0743c22147c34558db2;5d7591fa64b2e4a91d08b0743c22147c34558db2\",\"data\":{\"birthLength\":\"50\",\"birthPlace\":\"湖南湘西土家族保靖县苗族自治州\",\"birthTime\":\"2019年06月26日09时28分\",\"birthWeight\":\"3450\",\"certificateNumber\":\"A123456789\",\"fatherAddress\":\"湖南省保靖县迁陵镇东风村\",\"fatherAge\":\"35\",\"fatherEthnicity\":\"土家族\",\"fatherIdCardNumber\":\"631111222233334444\",\"fatherName\":\"读大光\",\"fatherNationality\":\"中国\",\"gestationalAge\":\"40\",\"issueAuthority\":\"保靖县人民医院\",\"issueDate\":\"2019年07月01日\",\"medicalInstitutions\":\"保靖县人民医院\",\"motherAddress\":\"湖南省湘西土家族苗族自治州保靖县\",\"motherAge\":\"33\",\"motherEthnicity\":\"汉族\",\"motherIdCardNumber\":\"431111222233334444\",\"motherName\":\"读小光\",\"motherNationality\":\"中国\",\"neonatalName\":\"读光\",\"sex\":\"男\"},\"debug_info\":{\"kv_info\":[{\"det_cfd\":0.753495,\"det_cls\":0,\"det_pts\":[1373.435059,927.88562,1534.484863,933.439087,1531.564941,1018.114258,1370.515137,1012.560791],\"rec_cfd\":0.999986,\"rec_tcc\":\"读光\"},{\"det_cfd\":0.588383,\"det_cls\":1,\"det_pts\":[2690.755615,1034.342896,2777.157471,1033.314331,2778.244873,1124.657349,2691.843018,1125.685913],\"rec_cfd\":0.999918,\"rec_tcc\":\"男\"},{\"det_cfd\":0.888493,\"det_cls\":2,\"det_pts\":[3359.441406,1024.680542,3561.763184,1022.528198,3562.559082,1097.319702,3360.237305,1099.472046],\"rec_cfd\":0.999486,\"rec_tcc\":\"2019\"},{\"det_cfd\":0.654637,\"det_cls\":3,\"det_pts\":[3882.199951,1014.599976,3989.800049,1014.599976,3989.800049,1089.400024,3882.199951,1089.400024],\"rec_cfd\":0.998459,\"rec_tcc\":\"06\"},{\"det_cfd\":0.935579,\"det_cls\":4,\"det_pts\":[4234.299805,1005.650024,4341.700195,1005.650024,4341.700195,1079.349976,4234.299805,1079.349976],\"rec_cfd\":0.999912,\"rec_tcc\":\"26\"},{\"det_cfd\":0.880952,\"det_cls\":5,\"det_pts\":[4553.457031,999.67865,4663.763672,998.529724,4664.542969,1073.321655,4554.236328,1074.470581],\"rec_cfd\":0.996432,\"rec_tcc\":\"09\"},{\"det_cfd\":0.58187,\"det_cls\":6,\"det_pts\":[4893,990.5,5003,990.5,5003,1067.5,4893,1067.5],\"rec_cfd\":0.999938,\"rec_tcc\":\"28\"},{\"det_cfd\":0.762958,\"det_cls\":7,\"det_pts\":[1459.271729,1195.45874,1569.286377,1197.750732,1567.728271,1272.54126,1457.713623,1270.249268],\"rec_cfd\":0.999709,\"rec_tcc\":\"40\"},{\"det_cfd\":0.865602,\"det_cls\":8,\"det_pts\":[2871.157715,1253.840942,3052.538574,1250.582642,3053.842285,1323.159302,2872.461426,1326.417603],\"rec_cfd\":0.999413,\"rec_tcc\":\"3450\"},{\"det_cfd\":0.649394,\"det_cls\":9,\"det_pts\":[4292.899902,1217.449951,4403.100098,1217.449951,4403.100098,1295.550049,4292.899902,1295.550049],\"rec_cfd\":0.99957,\"rec_tcc\":\"50\"},{\"det_cfd\":0.860922,\"det_cls\":10,\"det_pts\":[1194.791016,1365.426514,1391.336914,1374.210693,1387.208984,1466.57373,1190.663086,1457.789551],\"rec_cfd\":0.999989,\"rec_tcc\":\"湖南\"},{\"det_cfd\":0.738148,\"det_cls\":11,\"det_pts\":[1943.167603,1406.583008,2388.169189,1414.900879,2386.421143,1508.409424,1941.4198,1500.091553],\"rec_cfd\":0.999585,\"rec_tcc\":\"湘西土家族\"},{\"det_cfd\":0.819429,\"det_cls\":12,\"det_pts\":[2569.578369,1425.723877,2828.2854,1431.069092,2826.421631,1521.276123,2567.7146,1515.930908],\"rec_cfd\":0.999869,\"rec_tcc\":\"保靖县\"},{\"det_cfd\":0.820514,\"det_cls\":13,\"det_pts\":[3801.583252,1412.723755,4456.665039,1407.581909,4457.416016,1503.276001,3802.334229,1508.417847],\"rec_cfd\":0.999529,\"rec_tcc\":\"保靖县人民医院\"},{\"det_cfd\":0.697892,\"det_cls\":11,\"det_pts\":[1943.073364,1516.488281,2376.624268,1528.994385,2373.926514,1622.511719,1940.375854,1610.005615],\"rec_cfd\":0.999962,\"rec_tcc\":\"苗族自治州\"},{\"det_cfd\":0.770259,\"det_cls\":14,\"det_pts\":[1280.354736,1677.04126,1507.843994,1680.260498,1506.645508,1764.958984,1279.15625,1761.739746],\"rec_cfd\":0.999987,\"rec_tcc\":\"读小光\"},{\"det_cfd\":0.901819,\"det_cls\":15,\"det_pts\":[2180.189941,1761.712036,2285.000488,1764.750122,2282.800293,1840.650024,2177.989746,1837.611938],\"rec_cfd\":0.999637,\"rec_tcc\":\"33\"},{\"det_cfd\":0.875048,\"det_cls\":16,\"det_pts\":[2639.812256,1760.633301,2809.5896,1765.101074,2807.187744,1856.366699,2637.4104,1851.898926],\"rec_cfd\":0.999876,\"rec_tcc\":\"中国\"},{\"det_cfd\":0.878253,\"det_cls\":17,\"det_pts\":[3413.723389,1762.802979,3606.794678,1763.899902,3606.276123,1855.197021,3413.204834,1854.100098],\"rec_cfd\":0.999981,\"rec_tcc\":\"汉族\"},{\"det_cfd\":0.879656,\"det_cls\":18,\"det_pts\":[3947.144775,1760.804565,5336.321777,1767.892212,5335.855957,1859.195435,3946.678955,1852.107788],\"rec_cfd\":0.962864,\"rec_tcc\":\"湖南省湘西上家族苗族自治州保靖县\"},{\"det_cfd\":0.839463,\"det_cls\":19,\"det_pts\":[3962.5,1983.75,4657.5,1983.75,4657.5,2055.25,3962.5,2055.25],\"rec_cfd\":0.998724,\"rec_tcc\":\"431111222233334444\"},{\"det_cfd\":0.752617,\"det_cls\":20,\"det_pts\":[1210.96521,2230.024414,1440.565796,2232.17041,1439.763794,2317.973145,1210.163208,2315.827148],\"rec_cfd\":0.999983,\"rec_tcc\":\"读大光\"},{\"det_cfd\":0.800938,\"det_cls\":21,\"det_pts\":[2169.862305,2287.474121,2278.663086,2288.619629,2277.864258,2364.522949,2169.063477,2363.377441],\"rec_cfd\":0.999792,\"rec_tcc\":\"35\"},{\"det_cfd\":0.77213,\"det_cls\":22,\"det_pts\":[2628.460449,2276.739258,2805.650391,2278.799805,2804.550293,2373.399902,2627.360352,2371.339355],\"rec_cfd\":0.999996,\"rec_tcc\":\"中国\"},{\"det_cfd\":0.88073,\"det_cls\":23,\"det_pts\":[3420.291504,2294.573486,3686.585938,2299.920654,3684.708496,2393.427002,3418.414062,2388.079834],\"rec_cfd\":0.999425,\"rec_tcc\":\"土家族\"},{\"det_cfd\":0.847487,\"det_cls\":24,\"det_pts\":[3940.963623,2302.962158,4989.161621,2316.064697,4988.04834,2405.150635,3939.849854,2392.048096],\"rec_cfd\":0.99902,\"rec_tcc\":\"湖南省保靖县迁陵镇东风村\"},{\"det_cfd\":0.875087,\"det_cls\":25,\"det_pts\":[3937.505859,2480.62793,4635.710449,2482.669434,4635.494629,2556.37207,3937.290527,2554.330566],\"rec_cfd\":0.999808,\"rec_tcc\":\"631111222233334444\"},{\"det_cfd\":0.855461,\"det_cls\":26,\"det_pts\":[1440.082642,2925.831055,2255.370117,2908.353027,2257.91748,3027.168945,1442.629761,3044.646973],\"rec_cfd\":0.999966,\"rec_tcc\":\"保靖县人民医院\"},{\"det_cfd\":0.790936,\"det_cls\":27,\"det_pts\":[1280.261963,3170.223633,1504.923828,3168.063477,1505.738281,3252.776855,1281.076416,3254.937012],\"rec_cfd\":0.999695,\"rec_tcc\":\"2019\"},{\"det_cfd\":0.921903,\"det_cls\":28,\"det_pts\":[1901.559937,3154.37915,2009.564575,3153.218018,2010.439819,3234.620361,1902.435181,3235.781494],\"rec_cfd\":0.997407,\"rec_tcc\":\"07\"},{\"det_cfd\":0.798804,\"det_cls\":29,\"det_pts\":[2206.041016,3146.559326,2306.442383,3144.224365,2308.284668,3223.432861,2207.883301,3225.767822],\"rec_cfd\":0.998573,\"rec_tcc\":\"01\"},{\"det_cfd\":0.876541,\"det_cls\":30,\"det_pts\":[4107.072266,3127.911621,4750.024414,3134.341309,4748.926758,3244.088379,4105.974609,3237.658691],\"rec_cfd\":0.999947,\"rec_tcc\":\"A123456789\"}]},\"ftype\":0,\"height\":4500,\"orgHeight\":4500,\"orgWidth\":6000,\"prism_keyValueInfo\":[{\"key\":\"neonatalName\",\"keyProb\":100,\"value\":\"读光\",\"valuePos\":[{\"x\":1373,\"y\":927},{\"x\":1534,\"y\":933},{\"x\":1531,\"y\":1018},{\"x\":1369,\"y\":1011}],\"valueProb\":100},{\"key\":\"sex\",\"keyProb\":100,\"value\":\"男\",\"valuePos\":[{\"x\":2689,\"y\":1033},{\"x\":2777,\"y\":1033},{\"x\":2778,\"y\":1124},{\"x\":2691,\"y\":1125}],\"valueProb\":100},{\"key\":\"birthTime\",\"keyProb\":100,\"value\":\"2019年06月26日09时28分\",\"valuePos\":[{\"x\":3357,\"y\":1023},{\"x\":5020,\"y\":987},{\"x\":5022,\"y\":1066},{\"x\":3359,\"y\":1102}],\"valueProb\":100},{\"key\":\"gestationalAge\",\"keyProb\":100,\"value\":\"40\",\"valuePos\":[{\"x\":1458,\"y\":1194},{\"x\":1568,\"y\":1197},{\"x\":1567,\"y\":1272},{\"x\":1456,\"y\":1270}],\"valueProb\":100},{\"key\":\"birthWeight\",\"keyProb\":100,\"value\":\"3450\",\"valuePos\":[{\"x\":2870,\"y\":1253},{\"x\":3052,\"y\":1250},{\"x\":3053,\"y\":1322},{\"x\":2872,\"y\":1326}],\"valueProb\":100},{\"key\":\"birthLength\",\"keyProb\":100,\"value\":\"50\",\"valuePos\":[{\"x\":4292,\"y\":1217},{\"x\":4403,\"y\":1217},{\"x\":4403,\"y\":1295},{\"x\":4292,\"y\":1295}],\"valueProb\":100},{\"key\":\"birthPlace\",\"keyProb\":100,\"value\":\"湖南湘西土家族保靖县苗族自治州\",\"valuePos\":[{\"x\":1193,\"y\":1364},{\"x\":2829,\"y\":1431},{\"x\":2820,\"y\":1645},{\"x\":1185,\"y\":1579}],\"valueProb\":100},{\"key\":\"medicalInstitutions\",\"keyProb\":100,\"value\":\"保靖县人民医院\",\"valuePos\":[{\"x\":3801,\"y\":1412},{\"x\":4456,\"y\":1406},{\"x\":4457,\"y\":1503},{\"x\":3801,\"y\":1508}],\"valueProb\":100},{\"key\":\"motherName\",\"keyProb\":100,\"value\":\"读小光\",\"valuePos\":[{\"x\":1280,\"y\":1677},{\"x\":1507,\"y\":1680},{\"x\":1506,\"y\":1764},{\"x\":1278,\"y\":1760}],\"valueProb\":100},{\"key\":\"motherAge\",\"keyProb\":100,\"value\":\"33\",\"valuePos\":[{\"x\":2179,\"y\":1760},{\"x\":2284,\"y\":1763},{\"x\":2282,\"y\":1840},{\"x\":2176,\"y\":1836}],\"valueProb\":100},{\"key\":\"motherNationality\",\"keyProb\":100,\"value\":\"中国\",\"valuePos\":[{\"x\":2639,\"y\":1760},{\"x\":2809,\"y\":1765},{\"x\":2807,\"y\":1856},{\"x\":2636,\"y\":1850}],\"valueProb\":100},{\"key\":\"motherEthnicity\",\"keyProb\":100,\"value\":\"汉族\",\"valuePos\":[{\"x\":3412,\"y\":1763},{\"x\":3606,\"y\":1761},{\"x\":3606,\"y\":1853},{\"x\":3413,\"y\":1854}],\"valueProb\":100},{\"key\":\"motherAddress\",\"keyProb\":96,\"value\":\"湖南省湘西土家族苗族自治州保靖县\",\"valuePos\":[{\"x\":3946,\"y\":1767},{\"x\":5335,\"y\":1759},{\"x\":5336,\"y\":1851},{\"x\":3946,\"y\":1859}],\"valueProb\":96},{\"key\":\"motherIdCardNumber\",\"keyProb\":100,\"value\":\"431111222233334444\",\"valuePos\":[{\"x\":3962,\"y\":1983},{\"x\":4657,\"y\":1983},{\"x\":4657,\"y\":2055},{\"x\":3962,\"y\":2055}],\"valueProb\":100},{\"key\":\"fatherName\",\"keyProb\":100,\"value\":\"读大光\",\"valuePos\":[{\"x\":1209,\"y\":2232},{\"x\":1439,\"y\":2230},{\"x\":1440,\"y\":2315},{\"x\":1210,\"y\":2317}],\"valueProb\":100},{\"key\":\"fatherAge\",\"keyProb\":100,\"value\":\"35\",\"valuePos\":[{\"x\":2168,\"y\":2288},{\"x\":2277,\"y\":2287},{\"x\":2278,\"y\":2363},{\"x\":2169,\"y\":2364}],\"valueProb\":100},{\"key\":\"fatherNationality\",\"keyProb\":100,\"value\":\"中国\",\"valuePos\":[{\"x\":2628,\"y\":2275},{\"x\":2805,\"y\":2278},{\"x\":2804,\"y\":2372},{\"x\":2626,\"y\":2370}],\"valueProb\":100},{\"key\":\"fatherEthnicity\",\"keyProb\":100,\"value\":\"土家族\",\"valuePos\":[{\"x\":3419,\"y\":2293},{\"x\":3686,\"y\":2299},{\"x\":3684,\"y\":2393},{\"x\":3418,\"y\":2388}],\"valueProb\":100},{\"key\":\"fatherAddress\",\"keyProb\":100,\"value\":\"湖南省保靖县迁陵镇东风村\",\"valuePos\":[{\"x\":3940,\"y\":2302},{\"x\":4989,\"y\":2315},{\"x\":4988,\"y\":2405},{\"x\":3938,\"y\":2391}],\"valueProb\":100},{\"key\":\"fatherIdCardNumber\",\"keyProb\":100,\"value\":\"631111222233334444\",\"valuePos\":[{\"x\":3936,\"y\":2482},{\"x\":4635,\"y\":2480},{\"x\":4635,\"y\":2553},{\"x\":3937,\"y\":2556}],\"valueProb\":100},{\"key\":\"issueAuthority\",\"keyProb\":100,\"value\":\"保靖县人民医院\",\"valuePos\":[{\"x\":1439,\"y\":2925},{\"x\":2255,\"y\":2908},{\"x\":2257,\"y\":3026},{\"x\":1442,\"y\":3044}],\"valueProb\":100},{\"key\":\"issueDate\",\"keyProb\":100,\"value\":\"2019年07月01日\",\"valuePos\":[{\"x\":1277,\"y\":3171},{\"x\":2331,\"y\":3142},{\"x\":2334,\"y\":3231},{\"x\":1280,\"y\":3259}],\"valueProb\":100},{\"key\":\"certificateNumber\",\"keyProb\":100,\"value\":\"A123456789\",\"valuePos\":[{\"x\":4106,\"y\":3126},{\"x\":4750,\"y\":3134},{\"x\":4748,\"y\":3244},{\"x\":4105,\"y\":3237}],\"valueProb\":100}],\"sliceRect\":{\"x0\":491,\"x1\":5906,\"x2\":5628,\"x3\":172,\"y0\":387,\"y1\":363,\"y2\":4078,\"y3\":4265},\"width\":6000}" }
Codestring

错误码(如果识别成功,不会返回此字段)

示例值:noPermission
Messagestring

错误提示(如果识别成功,不会返回此字段)

示例值:You are not authorized to perform this operation.

返回说明

返回参数说明


字段类型说明
dataobject结构化信息。
sliceRectlist检测出的子图坐标信息。
prism_keyValueInfolist结构化信息的坐标信息。
ftypeint是否为复印件(1:是,0:否)。
heightint算法矫正图片后的高度。
widthint算法矫正图片后的宽度。
orgHeightint原图的高度。
orgWidthint原图的宽度。

结构化信息(data 字段)

字段类型说明
neonatalNamestring新生儿姓名。
sexstring性别。
birthTimestring出生时间。
gestationalAgestring出生孕周。
birthWeightstring出生体重。
birthLengthstring出生身长。
birthPlacestring出生地。
medicalInstitutionsstring医疗机构名称。
motherNamestring母亲姓名。
motherAgestring母亲年龄。
motherNationalitystring母亲国籍。
motherEthnicitystring母亲民族。
motherAddressstring母亲住址。
motherIdCardNumberstring母亲有效身份证件号。
fatherNamestring父亲姓名。
fatherAgestring父亲年龄。
fatherNationalitystring父亲国籍。
fatherEthnicitystring父亲民族。
fatherAddressstring父亲住址。
fatherIdCardNumberstring父亲有效身份证件号。
issueAuthoritystring签发机构。
issueDatestring签发日期。
certificateNumberstring编号。

结构化坐标信息(prism_keyValueInfo 字段)

字段类型说明
keystring识别出的字段名称。
keyProbint字段名称置信度。
valuestring识别出的字段名称对应的值。
valueProbint字段名称对应值的置信度。
valuePoslist字段在原图中的四个点坐标(左上、右上、右下、左下)。

返回示例

变更历史

变更时间变更内容概要操作
2022-11-25
变更请求参数Url
2021-08-17
变更请求参数Url
新增请求参数body

相关示例