jtl*_*lz2 5 azure azure-cognitive-services
Azure CS的OCR演示(westcentralus终结点)位于
https://azure.microsoft.com/zh-CN/services/cognitive-services/computer-vision/?v=18.05
在较差的测试图像上(恐怕我不能发布,因为它是身份证明文件),我得到的OCR结果实际上与三个测试用例的实际文本匹配100%-非常好。
但是,当我在下面的URL上使用Westeurope端点跟踪示例时,我得到的OCR结果更差-缺少一些文本:
为什么是这样?更重要的是-如何访问v = 18.05端点?
感谢您提供的所有快速帮助。
我想我的意思是:您在提到的两页之间没有使用相同的操作。
如果您在工作演示的上方阅读了该段,则在此处提到的内容是:
全面开放OCR服务,并通过以下方式发现新的预览OCR引擎(通过“ Recognize Text” API操作),并获得更好的英语文本识别结果。
并且,如果您看一下所指向的其他文档(本文档),则它们使用的是OCR操作:
vision_base_url = "https://westcentralus.api.cognitive.microsoft.com/vision/v2.0/"
ocr_url = vision_base_url + "ocr"
Run Code Online (Sandbox Code Playgroud)
因此,如果您想使用此新的预览版本,请将操作更改为 recognizeText
它在西欧地区可用(请参阅此处),我进行了一个快速测试:Azure演示页上提供的示例正在使用此操作,而在另一个操作中却没有。
但是这次操作需要2个调用:
recognizeText
操作),在那里您将得到一个202 Accepted
答案,并带有operationId
textOperations
使用上一步中的OperationId进行一次GET操作以获取结果(操作)。例如:https://westeurope.api.cognitive.microsoft.com/vision/v2.0/textOperations/yourOperationId
对于Microsoft演示的CLOSED标志:
OCR操作的结果:
{
"language": "unk",
"orientation": "NotDetected",
"textAngle": 0.0,
"regions": []
}
Run Code Online (Sandbox Code Playgroud)
结果与RecognizeText:
{
"status": "Succeeded",
"recognitionResult": {
"lines": [{
"boundingBox": [174, 488, 668, 675, 617, 810, 123, 622],
"text": "CLOSED",
"words": [{
"boundingBox": [164, 494, 659, 673, 621, 810, 129, 628],
"text": "CLOSED"
}]
}, {
"boundingBox": [143, 641, 601, 811, 589, 843, 132, 673],
"text": "WHEN ONE DOOR CLOSES, ANOTHER",
"words": [{
"boundingBox": [147, 646, 217, 671, 205, 698, 134, 669],
"text": "WHEN"
}, {
"boundingBox": [230, 675, 281, 694, 269, 724, 218, 703],
"text": "ONE"
}, {
"boundingBox": [291, 697, 359, 722, 348, 754, 279, 727],
"text": "DOOR"
}, {
"boundingBox": [370, 726, 479, 767, 469, 798, 359, 758],
"text": "CLOSES,"
}, {
"boundingBox": [476, 766, 598, 812, 588, 839, 466, 797],
"text": "ANOTHER"
}]
}, {
"boundingBox": [56, 668, 645, 886, 633, 919, 44, 700],
"text": "OPENS.ALL YOU HAVE TO DO IS WALK IN",
"words": [{
"boundingBox": [74, 677, 223, 731, 213, 764, 65, 707],
"text": "OPENS.ALL"
}, {
"boundingBox": [233, 735, 291, 756, 280, 789, 223, 767],
"text": "YOU"
}, {
"boundingBox": [298, 759, 377, 788, 367, 821, 288, 792],
"text": "HAVE"
}, {
"boundingBox": [387, 792, 423, 805, 413, 838, 376, 824],
"text": "TO"
}, {
"boundingBox": [431, 808, 472, 824, 461, 855, 420, 841],
"text": "DO"
}, {
"boundingBox": [479, 826, 510, 838, 499, 869, 468, 858],
"text": "IS"
}, {
"boundingBox": [518, 841, 598, 872, 587, 901, 506, 872],
"text": "WALK"
}, {
"boundingBox": [606, 875, 639, 887, 627, 916, 594, 904],
"text": "IN"
}]
}]
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2609 次 |
最近记录: |