AI-102 Question 115
Select 2You are using the Azure Computer Vision API to analyze an image for text recognition (OCR). The API response returns the following JSON snippet:
{ "regions": [ { "lines": [ { "words": [ { "text": "Azure" }, { "text": "AI" } ] }, { "words": [ { "text": "Solution" } ] } ] } ] }
Based on this response, which of the following statements are correct when interpreting the output?
- A
The image contains the text 'Azure AI Solution'.
- B
The response indicates the presence of multiple regions in the image.
- C
Each 'words' array represents all text from a single line in the image.
- D
The 'regions' array contains multiple lines of text detected in a specific area of the image.
- E
The API response includes metadata about the confidence score for each detected word.
Show answer and explanation
Correct answers: A, D
Explanation
The Azure Computer Vision API response organizes detected text hierarchically, with 'regions' representing different areas of the image, 'lines' representing lines of text within each region, and 'words' representing the individual words within each line. The response in the question indicates that the image contains the text 'Azure AI Solution' and that the 'regions' array encapsulates lines of text in a specific area. However, there is no evidence of multiple regions or confidence score metadata in this specific response.
- A. Correct.
Correct: The response shows that the detected text is 'Azure AI Solution', which is reconstructed by combining the text from the 'words' arrays across all lines.
- B. Incorrect.
Incorrect: The response shows only one region, as there is a single 'regions' array in the JSON snippet.
- C. Incorrect.
Incorrect: Each 'words' array represents individual words in a line, not the entire line itself. Lines are represented by the 'lines' array.
- D. Correct.
Correct: The 'regions' array groups lines of text detected in a specific part of the image, as evidenced by the nested structure of 'lines' and 'words' under 'regions'.
- E. Incorrect.
Incorrect: The JSON snippet provided does not include any metadata about confidence scores for detected words.