private static async Task OCRAsync(string option) { var imageFilePath = GetImageFullPath($"Vision-{option}.jpg"); var byteData = GetImageAsByteArray(imageFilePath); Console.WriteLine($"{Environment.NewLine}>> Calling Computer Vision API, please wait a moment for the results..."); var client = new ComputerVisionAPIClient(); var results = await client.OCRAsync(byteData); ShowResults(results); }
private static async Task AnalyzeImageAsync(string option) { var imageFilePath = GetImageFullPath($"Vision-{option}.jpg"); var byteData = GetImageAsByteArray(imageFilePath); Console.WriteLine($"{Environment.NewLine}>> Calling Computer Vision API, please wait a moment for the results..."); var client = new ComputerVisionAPIClient(); var results = await client.AnalyzeImageAsync(byteData, "Categories,Tags,Description,Faces,ImageType,Color,Adult", "Celebrities,Landmarks"); ShowResults(results); }