我正在尝试使用Microsoft Cognitive Vision从护照中读取MRZ区域,但是这是不可能的。当(我想)是所有字段中最简单的字段时,它永远不会返回该字段。
一个例子:
有人知道为什么它不返回该字段吗?认知领域有限制吗?我是否需要包括任何参数以增加要返回的字段数?是否有任何有效的替代方法可以返回该字段(我尝试过Amazon Rekognition,但仅返回50个字段)
答案 0 :(得分:1)
我刚刚使用Computer Vision API的OCR和Computer Vision API的Recognize Text对您的示例进行了测试,并且可以确认它不会返回OCR中的MRZ区域,但可以与Recognize完美结合文字!
这是使用 OCR 的结果:
{
"language": "en",
"orientation": "Up",
"textAngle": 0.0,
"regions": [{
"boundingBox": "426,113,815,25",
"lines": [{
"boundingBox": "426,113,104,24",
"words": [{
"boundingBox": "426,113,49,24",
"text": "Tun/"
}, {
"boundingBox": "482,113,48,24",
"text": "Type"
}]
}, {
"boundingBox": "590,113,651,25",
"words": [{
"boundingBox": "590,113,41,22",
"text": "KOA"
}, {
"boundingBox": "636,113,106,24",
"text": "mepxaBM/"
}, {
"boundingBox": "746,113,145,25",
"text": "qountrycode"
}, {
"boundingBox": "914,113,71,24",
"text": "HOMep"
}, {
"boundingBox": "992,113,111,24",
"text": "nacnopTa/"
}, {
"boundingBox": "1108,113,94,24",
"text": "Passport"
}, {
"boundingBox": "1206,113,35,19",
"text": "No."
}]
}]
}, {
"boundingBox": "220,151,168,61",
"lines": [{
"boundingBox": "222,151,165,24",
"words": [{
"boundingBox": "222,151,165,24",
"text": "nAcnOPT"
}]
}, {
"boundingBox": "220,187,168,25",
"words": [{
"boundingBox": "220,187,168,25",
"text": "PASSPORT"
}]
}]
}, {
"boundingBox": "426,144,410,318",
"lines": [{
"boundingBox": "428,144,18,29",
"words": [{
"boundingBox": "428,144,18,29",
"text": "p"
}]
}, {
"boundingBox": "592,145,69,29",
"words": [{
"boundingBox": "592,145,69,29",
"text": "UKR"
}]
}, {
"boundingBox": "426,184,214,25",
"words": [{
"boundingBox": "426,185,114,24",
"text": "npi3Bv1Lue/"
}, {
"boundingBox": "545,184,95,20",
"text": "Surname"
}]
}, {
"boundingBox": "429,212,407,36",
"words": [{
"boundingBox": "429,212,407,36",
"text": "TKAHEHKO/TKACHENKO"
}]
}, {
"boundingBox": "426,255,195,24",
"words": [{
"boundingBox": "426,255,51,24",
"text": "1M'\"/"
}, {
"boundingBox": "483,255,58,20",
"text": "Given"
}, {
"boundingBox": "548,256,73,19",
"text": "Names"
}]
}, {
"boundingBox": "429,286,321,36",
"words": [{
"boundingBox": "429,286,321,36",
"text": "MAP'AHA/MARIANA"
}]
}, {
"boundingBox": "426,328,284,24",
"words": [{
"boundingBox": "426,328,164,24",
"text": "rPOMaARHCTBO/"
}, {
"boundingBox": "596,328,114,23",
"text": "Nationality"
}]
}, {
"boundingBox": "430,352,314,41",
"words": [{
"boundingBox": "430,352,314,41",
"text": "YKPAiHA/UKRAINE"
}]
}, {
"boundingBox": "426,398,339,24",
"words": [{
"boundingBox": "426,398,53,23",
"text": "LlaTa"
}, {
"boundingBox": "486,398,143,24",
"text": "HaPOAXeHHA/"
}, {
"boundingBox": "634,398,49,20",
"text": "Date"
}, {
"boundingBox": "689,398,23,20",
"text": "of"
}, {
"boundingBox": "715,398,50,20",
"text": "birth"
}]
}, {
"boundingBox": "428,427,256,35",
"words": [{
"boundingBox": "428,428,40,29",
"text": "-24"
}, {
"boundingBox": "482,427,148,35",
"text": "CEP/AUG"
}, {
"boundingBox": "639,427,45,30",
"text": "91"
}]
}]
}, {
"boundingBox": "901,143,175,317",
"lines": [{
"boundingBox": "908,143,168,33",
"words": [{
"boundingBox": "908,143,168,33",
"text": "xxoooooo"
}]
}, {
"boundingBox": "914,397,118,21",
"words": [{
"boundingBox": "914,397,100,21",
"text": "3anncNQ/"
}, {
"boundingBox": "1019,398,13,19",
"text": "R"
}]
}, {
"boundingBox": "901,425,131,35",
"words": [{
"boundingBox": "901,425,131,35",
"text": "123456"
}]
}]
}, {
"boundingBox": "426,469,521,27",
"lines": [{
"boundingBox": "426,469,521,27",
"words": [{
"boundingBox": "426,470,72,24",
"text": "CTaTb/"
}, {
"boundingBox": "503,470,42,20",
"text": "Sex"
}, {
"boundingBox": "592,470,63,23",
"text": "Micue"
}, {
"boundingBox": "662,470,206,26",
"text": "HaponxeHH9/P/ace"
}, {
"boundingBox": "874,470,23,20",
"text": "of"
}, {
"boundingBox": "900,469,47,21",
"text": "birth"
}]
}]
}, {
"boundingBox": "426,492,388,113",
"lines": [{
"boundingBox": "432,492,382,42",
"words": [{
"boundingBox": "432,498,66,36",
"text": ">K/F"
}, {
"boundingBox": "595,499,36,31",
"text": "M."
}, {
"boundingBox": "646,492,168,41",
"text": "KVliB/UKR"
}]
}, {
"boundingBox": "426,541,278,24",
"words": [{
"boundingBox": "426,541,53,23",
"text": "AaTa"
}, {
"boundingBox": "486,541,78,24",
"text": "unaqi/"
}, {
"boundingBox": "569,541,49,19",
"text": "Date"
}, {
"boundingBox": "624,541,23,20",
"text": "of"
}, {
"boundingBox": "650,541,54,20",
"text": "issue"
}]
}, {
"boundingBox": "430,569,243,36",
"words": [{
"boundingBox": "430,570,39,30",
"text": "25"
}, {
"boundingBox": "484,569,138,36",
"text": "BEP/SEP"
}, {
"boundingBox": "638,569,35,29",
"text": "13"
}]
}]
}, {
"boundingBox": "914,538,275,62",
"lines": [{
"boundingBox": "914,538,275,33",
"words": [{
"boundingBox": "914,540,71,25",
"text": "OpraH,"
}, {
"boundingBox": "1031,538,158,33",
"text": "BHAaB(Authgri"
}]
}, {
"boundingBox": "914,568,89,32",
"words": [{
"boundingBox": "914,568,89,32",
"text": "xxxx"
}]
}]
}, {
"boundingBox": "76,606,1261,312",
"lines": [{
"boundingBox": "426,606,911,35",
"words": [{
"boundingBox": "426,613,53,25",
"text": "AaTa"
}, {
"boundingBox": "485,613,116,19",
"text": "aaKil-lHeHHfl"
}, {
"boundingBox": "608,617,72,20",
"text": "CTPOKY"
}, {
"boundingBox": "685,613,35,24",
"text": "Aii/"
}, {
"boundingBox": "726,613,49,19",
"text": "Date"
}, {
"boundingBox": "780,613,91,24",
"text": "ofexpiry"
}, {
"boundingBox": "914,613,118,26",
"text": "[liannc,ppe"
}, {
"boundingBox": "1077,606,129,31",
"text": "WilKä/hiöldé"
}, {
"boundingBox": "1248,613,89,28",
"text": "qtlåtåre"
}]
}, {
"boundingBox": "431,644,243,37",
"words": [{
"boundingBox": "431,645,39,30",
"text": "25"
}, {
"boundingBox": "485,644,138,37",
"text": "BEP/SEP"
}, {
"boundingBox": "636,644,38,29",
"text": "23"
}]
}, {
"boundingBox": "76,885,567,33",
"words": [{
"boundingBox": "76,885,567,33",
"text": "XXOOOOOO<OUKR9108242"
}]
}]
}]
}
这是使用识别文本的结果:
{
"status": "Succeeded",
"recognitionResult": {
"lines": [{
"boundingBox": [422, 64, 1090, 62, 1091, 110, 423, 112],
"text": "LA yKPAIHA & UKRAINE",
"words": [{
"boundingBox": [419, 68, 456, 67, 454, 111, 418, 110],
"text": "LA"
}, {
"boundingBox": [478, 67, 702, 64, 701, 113, 477, 111],
"text": "yKPAIHA"
}, {
"boundingBox": [732, 64, 760, 64, 760, 113, 732, 113],
"text": "&"
}, {
"boundingBox": [802, 64, 1029, 64, 1030, 110, 802, 113],
"text": "UKRAINE"
}]
}, {
"boundingBox": [424, 111, 536, 112, 535, 138, 423, 136],
"text": "Tun/ Type",
"words": [{
"boundingBox": [425, 112, 478, 112, 479, 138, 426, 138],
"text": "Tun/"
}, {
"boundingBox": [478, 112, 531, 114, 532, 137, 479, 138],
"text": "Type"
}]
}, {
"boundingBox": [583, 111, 1241, 110, 1242, 138, 584, 138],
"text": "KoA nepxaBu/ Country code Homep nacnopTa/ Passport No.",
"words": [{
"boundingBox": [584, 111, 631, 112, 631, 139, 584, 139],
"text": "KoA"
}, {
"boundingBox": [633, 112, 744, 113, 744, 138, 633, 139],
"text": "nepxaBu/"
}, {
"boundingBox": [744, 113, 832, 113, 832, 138, 744, 138],
"text": "Country"
}, {
"boundingBox": [832, 113, 888, 113, 888, 138, 832, 138],
"text": "code"
}, {
"boundingBox": [909, 113, 986, 113, 987, 138, 909, 138],
"text": "Homep"
}, {
"boundingBox": [986, 113, 1106, 112, 1107, 138, 987, 138],
"text": "nacnopTa/"
}, {
"boundingBox": [1105, 112, 1207, 111, 1208, 138, 1105, 138],
"text": "Passport"
}, {
"boundingBox": [1201, 111, 1248, 111, 1249, 139, 1202, 138],
"text": "No."
}]
}, {
"boundingBox": [66, 152, 171, 157, 171, 206, 68, 207],
"text": "-O",
"words": [{
"boundingBox": [56, 151, 138, 155, 136, 209, 53, 205],
"text": "-O"
}]
}, {
"boundingBox": [213, 142, 397, 139, 398, 183, 213, 186],
"text": "nAcnOPT",
"words": [{
"boundingBox": [213, 143, 393, 141, 393, 184, 215, 187],
"text": "nAcnOPT"
}]
}, {
"boundingBox": [407, 146, 480, 148, 479, 172, 407, 174],
"text": "P",
"words": [{
"boundingBox": [426, 146, 445, 147, 444, 175, 425, 174],
"text": "P"
}]
}, {
"boundingBox": [583, 144, 685, 144, 684, 174, 582, 173],
"text": "UKR",
"words": [{
"boundingBox": [588, 145, 654, 147, 655, 173, 589, 175],
"text": "UKR"
}]
}, {
"boundingBox": [214, 176, 402, 180, 401, 224, 213, 220],
"text": "PASSPORT",
"words": [{
"boundingBox": [214, 179, 392, 183, 392, 223, 218, 222],
"text": "PASSPORT"
}]
}, {
"boundingBox": [900, 136, 1085, 137, 1084, 181, 899, 180],
"text": "XX000000",
"words": [{
"boundingBox": [906, 138, 1080, 139, 1077, 182, 911, 181],
"text": "XX000000"
}]
}, {
"boundingBox": [399, 183, 646, 182, 647, 207, 400, 208],
"text": "npi3BNLLle/ Surname",
"words": [{
"boundingBox": [422, 185, 542, 184, 541, 209, 421, 208],
"text": "npi3BNLLle/"
}, {
"boundingBox": [546, 184, 641, 184, 641, 208, 546, 209],
"text": "Surname"
}]
}, {
"boundingBox": [423, 210, 835, 207, 836, 244, 424, 247],
"text": "TKAYEHKO/TKACHENKO",
"words": [{
"boundingBox": [429, 211, 835, 208, 835, 244, 430, 247],
"text": "TKAYEHKO/TKACHENKO"
}]
}, {
"boundingBox": [422, 251, 630, 253, 629, 279, 421, 278],
"text": "IM's/ Given Names",
"words": [{
"boundingBox": [419, 254, 480, 253, 480, 279, 420, 279],
"text": "IM's/"
}, {
"boundingBox": [483, 253, 542, 253, 542, 280, 483, 279],
"text": "Given"
}, {
"boundingBox": [545, 253, 625, 255, 624, 280, 545, 280],
"text": "Names"
}]
}, {
"boundingBox": [424, 275, 929, 286, 928, 339, 423, 328],
"text": "MAP'AHA/MARIANA",
"words": [{
"boundingBox": [422, 285, 744, 285, 746, 324, 424, 321],
"text": "MAP'AHA/MARIANA"
}]
}, {
"boundingBox": [424, 325, 720, 324, 721, 352, 425, 353],
"text": "poManAHCTBO/ Nationality",
"words": [{
"boundingBox": [435, 328, 592, 326, 592, 353, 435, 352],
"text": "poManAHCTBO/"
}, {
"boundingBox": [592, 326, 707, 326, 706, 353, 592, 353],
"text": "Nationality"
}]
}, {
"boundingBox": [423, 347, 914, 332, 916, 383, 425, 398],
"text": "yKPAIHA/UKRAINEAIN",
"words": [{
"boundingBox": [429, 355, 868, 338, 871, 386, 431, 391],
"text": "yKPAIHA/UKRAINEAIN"
}]
}, {
"boundingBox": [426, 384, 896, 394, 895, 445, 425, 435],
"text": "AaTa HapoAxeHHA/ Date of birth",
"words": [{
"boundingBox": [424, 398, 482, 398, 482, 423, 424, 425],
"text": "AaTa"
}, {
"boundingBox": [480, 398, 633, 398, 632, 422, 480, 423],
"text": "HapoAxeHHA/"
}, {
"boundingBox": [633, 398, 685, 397, 684, 425, 632, 422],
"text": "Date"
}, {
"boundingBox": [687, 397, 715, 397, 715, 427, 686, 425],
"text": "of"
}, {
"boundingBox": [712, 397, 762, 396, 761, 430, 711, 426],
"text": "birth"
}]
}, {
"boundingBox": [429, 424, 702, 421, 703, 459, 429, 462],
"text": "24 CEP/AUG 91",
"words": [{
"boundingBox": [425, 425, 469, 425, 470, 461, 426, 460],
"text": "24"
}, {
"boundingBox": [481, 425, 630, 425, 630, 460, 481, 462],
"text": "CEP/AUG"
}, {
"boundingBox": [639, 425, 686, 425, 685, 457, 639, 459],
"text": "91"
}]
}, {
"boundingBox": [906, 394, 1123, 393, 1124, 422, 907, 423],
"text": "3annc No/ Record No.",
"words": [{
"boundingBox": [913, 397, 980, 395, 980, 422, 913, 424],
"text": "3annc"
}, {
"boundingBox": [978, 395, 1018, 394, 1018, 422, 978, 422],
"text": "No/"
}, {
"boundingBox": [1014, 394, 1089, 395, 1088, 423, 1014, 422],
"text": "Record"
}, {
"boundingBox": [1089, 395, 1130, 397, 1129, 424, 1088, 423],
"text": "No."
}]
}, {
"boundingBox": [902, 415, 1119, 416, 1118, 461, 901, 459],
"text": "1234567890",
"words": [{
"boundingBox": [905, 416, 1119, 418, 1117, 461, 908, 461],
"text": "1234567890"
}]
}, {
"boundingBox": [426, 468, 568, 466, 569, 492, 426, 493],
"text": "CTaTb/ Sex",
"words": [{
"boundingBox": [425, 468, 501, 469, 501, 494, 426, 493],
"text": "CTaTb/"
}, {
"boundingBox": [504, 469, 545, 469, 543, 492, 504, 494],
"text": "Sex"
}]
}, {
"boundingBox": [573, 467, 954, 467, 954, 493, 574, 494],
"text": "Micue HaponxeHHa/ Place of birth",
"words": [{
"boundingBox": [588, 470, 656, 470, 656, 495, 588, 494],
"text": "Micue"
}, {
"boundingBox": [658, 470, 808, 469, 808, 495, 658, 495],
"text": "HaponxeHHa/"
}, {
"boundingBox": [808, 469, 868, 468, 868, 495, 808, 495],
"text": "Place"
}, {
"boundingBox": [873, 468, 899, 468, 899, 495, 873, 495],
"text": "of"
}, {
"boundingBox": [897, 468, 946, 468, 946, 495, 897, 495],
"text": "birth"
}]
}, {
"boundingBox": [428, 494, 507, 496, 506, 534, 433, 532],
"text": "XX/F",
"words": [{
"boundingBox": [431, 494, 499, 496, 498, 534, 430, 532],
"text": "XX/F"
}]
}, {
"boundingBox": [580, 489, 812, 492, 811, 537, 579, 534],
"text": "M. KNIB/UKR",
"words": [{
"boundingBox": [586, 492, 641, 492, 643, 535, 590, 534],
"text": "M."
}, {
"boundingBox": [638, 492, 810, 493, 809, 538, 641, 535],
"text": "KNIB/UKR"
}]
}, {
"boundingBox": [428, 538, 708, 539, 707, 565, 427, 564],
"text": "LaTa BuAayi/ Date of issue",
"words": [{
"boundingBox": [426, 541, 480, 540, 481, 565, 427, 564],
"text": "LaTa"
}, {
"boundingBox": [482, 540, 565, 540, 566, 565, 483, 565],
"text": "BuAayi/"
}, {
"boundingBox": [568, 540, 618, 539, 619, 565, 569, 565],
"text": "Date"
}, {
"boundingBox": [623, 539, 649, 539, 649, 565, 623, 565],
"text": "of"
}, {
"boundingBox": [645, 539, 704, 539, 703, 565, 645, 565],
"text": "issue"
}]
}, {
"boundingBox": [429, 561, 678, 564, 678, 608, 428, 605],
"text": "25 BEP/SEP 13",
"words": [{
"boundingBox": [423, 563, 475, 563, 476, 606, 425, 607],
"text": "25"
}, {
"boundingBox": [477, 563, 625, 564, 625, 608, 479, 606],
"text": "BEP/SEP"
}, {
"boundingBox": [631, 564, 679, 565, 679, 609, 631, 608],
"text": "13"
}]
}, {
"boundingBox": [913, 536, 1207, 537, 1206, 568, 912, 567],
"text": "OpraH, Lilo BunaB/ Authority",
"words": [{
"boundingBox": [912, 540, 992, 540, 992, 565, 913, 565],
"text": "OpraH,"
}, {
"boundingBox": [989, 540, 1026, 540, 1026, 565, 989, 565],
"text": "Lilo"
}, {
"boundingBox": [1028, 539, 1109, 539, 1108, 567, 1028, 565],
"text": "BunaB/"
}, {
"boundingBox": [1108, 539, 1205, 538, 1204, 569, 1107, 567],
"text": "Authority"
}]
}, {
"boundingBox": [909, 565, 1026, 568, 1025, 601, 908, 598],
"text": "XXXX",
"words": [{
"boundingBox": [914, 567, 1001, 569, 1001, 599, 915, 600],
"text": "XXXX"
}]
}, {
"boundingBox": [422, 611, 1336, 610, 1337, 637, 423, 638],
"text": "LaTa 3akiHyeHHA CTpoky Ail/ Date of expiry finnnc npen ABHuka/ Holder's signature",
"words": [{
"boundingBox": [425, 613, 479, 613, 480, 637, 425, 637],
"text": "LaTa"
}, {
"boundingBox": [484, 613, 602, 613, 602, 638, 484, 637],
"text": "3akiHyeHHA"
}, {
"boundingBox": [605, 613, 681, 612, 681, 639, 605, 638],
"text": "CTpoky"
}, {
"boundingBox": [683, 612, 722, 612, 722, 639, 683, 639],
"text": "Ail/"
}, {
"boundingBox": [725, 612, 775, 612, 775, 639, 725, 639],
"text": "Date"
}, {
"boundingBox": [780, 612, 806, 612, 805, 639, 780, 639],
"text": "of"
}, {
"boundingBox": [804, 612, 871, 612, 870, 639, 804, 639],
"text": "expiry"
}, {
"boundingBox": [909, 612, 988, 612, 987, 639, 908, 639],
"text": "finnnc"
}, {
"boundingBox": [989, 612, 1046, 611, 1044, 639, 988, 639],
"text": "npen"
}, {
"boundingBox": [1052, 611, 1141, 611, 1140, 638, 1050, 639],
"text": "ABHuka/"
}, {
"boundingBox": [1141, 611, 1235, 611, 1234, 638, 1140, 638],
"text": "Holder's"
}, {
"boundingBox": [1237, 611, 1337, 611, 1335, 637, 1235, 638],
"text": "signature"
}]
}, {
"boundingBox": [427, 638, 677, 637, 678, 681, 428, 683],
"text": "25 BEP/SEP 23",
"words": [{
"boundingBox": [426, 641, 475, 640, 477, 683, 429, 684],
"text": "25"
}, {
"boundingBox": [477, 639, 625, 638, 625, 681, 480, 683],
"text": "BEP/SEP"
}, {
"boundingBox": [630, 638, 679, 639, 679, 682, 631, 681],
"text": "23"
}]
}, {
"boundingBox": [69, 805, 891, 803, 892, 845, 70, 846],
"text": "P<UKRTKACHENKO< <MARIANA< < < < <",
"words": [{
"boundingBox": [70, 809, 498, 811, 499, 847, 72, 844],
"text": "P<UKRTKACHENKO<"
}, {
"boundingBox": [503, 811, 759, 808, 759, 846, 504, 847],
"text": "<MARIANA<"
}, {
"boundingBox": [763, 808, 787, 807, 788, 846, 764, 846],
"text": "<"
}, {
"boundingBox": [791, 807, 815, 806, 816, 846, 792, 846],
"text": "<"
}, {
"boundingBox": [822, 806, 845, 806, 846, 845, 823, 846],
"text": "<"
}, {
"boundingBox": [850, 806, 874, 805, 874, 845, 851, 845],
"text": "<"
}]
}, {
"boundingBox": [70, 876, 1346, 877, 1346, 926, 69, 925],
"text": "XX000000<OUKR9108242F23092571234567890< < < <70",
"words": [{
"boundingBox": [71, 879, 1198, 878, 1197, 927, 71, 926],
"text": "XX000000<OUKR9108242F23092571234567890<"
}, {
"boundingBox": [1195, 878, 1226, 878, 1225, 927, 1194, 927],
"text": "<"
}, {
"boundingBox": [1226, 878, 1257, 878, 1256, 927, 1225, 927],
"text": "<"
}, {
"boundingBox": [1254, 878, 1346, 877, 1345, 927, 1253, 927],
"text": "<70"
}]
}]
}
}
因此,尝试使用Computer Vision API的Recognize Text,然后使用Get Recognize Text Operation Result来获得操作结果。