Discover why your Azure AI Vision C# app might produce an empty output file when extracting text from images. Learn common issues, such as image size limitations, and how to resolve them effectively.
Table of Contents
Question
You are creating a C# app that uses the Azure AI Vision service to extract text from the following image to a text file.
The image is in the following folder.
You use Visual Studio to create the app. You configure environment variables for the key and endpoint. You use the Microsoft.Azure.CognitiveServices.Vision.ComputerVision NuGet package for text extraction.
After running the application, you would see something like the following:
———————————————————-
READ FILE FROM URL
Extracting text from URL file DrPepperZeroCan.jpg…
Nutrition Facts Amount Per Serving
Serving size: 1 Can
Amount per serving
Calories 0
% Daily Value
Total Fat 0g 0%
Sodium 60mg 3%
Total Carb. 0g 0%
Total Sugars 0g
Incl. 0g Added Sugars 0%
Protein 0g
Not a significant source of sat fat, transfat, cholest, fiber, vit. D, calcium, iron, and potas.
However, when you run the application, the output file is empty. What could be the problem?
A. The graphic must be a .PNG file, not .JPG.
B. Azure AI Vision only supports apps running JavaScript, not C#.
C. Azure AI Vision only supports apps running Python, not C#.
D. The image is too light to read the white letters.
E. The image is too large.
Answer
E. The image is too large.
Explanation
The image is too large in this scenario. Azure AI Vision can only read files that are less than 4 MB. The file in this scenario 6,313 KB or roughly 6 MB, which exceeds the 4 MB limit.
The image is not too light. The white letters are contrasted by a dark background which the OCR capabilities of the Azure AI Vision service would be able to read.
The graphic does not have to be a .PNG file. Azure AI Vision service can support JPEG, PNG, GIF, and BMP files.
The Azure AI Vision service supports apps from multiple programming languages, including C#, Python, JavaScript, REST API, and Vision Studio.
Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.