PTI.Microservices.Library.AzureComputerVision 7.0.0.3

dotnet add package PTI.Microservices.Library.AzureComputerVision --version 7.0.0.3
NuGet\Install-Package PTI.Microservices.Library.AzureComputerVision -Version 7.0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PTI.Microservices.Library.AzureComputerVision" Version="7.0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PTI.Microservices.Library.AzureComputerVision --version 7.0.0.3
#r "nuget: PTI.Microservices.Library.AzureComputerVision, 7.0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PTI.Microservices.Library.AzureComputerVision as a Cake Addin
#addin nuget:?package=PTI.Microservices.Library.AzureComputerVision&version=7.0.0.3

// Install PTI.Microservices.Library.AzureComputerVision as a Cake Tool
#tool nuget:?package=PTI.Microservices.Library.AzureComputerVision&version=7.0.0.3

PTI.Microservices.Library.AzureComputerVision

Facilitates the consumption of the APIs in Azure Computer Vision

Examples:

Note: The examples below are passing null for the logger, if you want to use the logger make sure to pass the parameter with a value other than null

Describe Image

CustomHttpClient customHttpClient = new CustomHttpClient(new CustomHttpClientHandler(null));
AzureComputerVisionService azureComputerVisionService =
   new AzureComputerVisionService(null, this.AzureComputerVisionConfiguration,
   customHttpClient);
Stream imageStream = (await new HttpClient().GetStreamAsync(this.TestFaceImageUrl));
var result = await azureComputerVisionService.DescribeImageAsync(imageStream,
Path.GetFileName(this.TestComputerVisionImageUri));

Analyze Image

CustomHttpClient customHttpClient = new CustomHttpClient(new CustomHttpClientHandler(null));
AzureComputerVisionService azureComputerVisionService =
   new AzureComputerVisionService(null, this.AzureComputerVisionConfiguration,
   customHttpClient);
var allVisualFeatures = Enum.GetValues(typeof(VisualFeature)).Cast<VisualFeature>().ToList();
var allDetails = Enum.GetValues(typeof(Details)).Cast<Details>().ToList();
var result = await azureComputerVisionService.AnalyzeImageAsync(new Uri(this.TestComputerVisionImageUri),
allVisualFeatures, allDetails);

Read (For Text-heavy images)

CustomHttpClient customHttpClient = new CustomHttpClient(new CustomHttpClientHandler(null));
AzureComputerVisionService azureComputerVisionService =
   new AzureComputerVisionService(null, this.AzureComputerVisionConfiguration,
   customHttpClient);
var result = 
await azureComputerVisionService.ReadAsync(
   new Uri(ImageWithTextUrl));
var simpleRebuiltText =
   String.Join(" ", result.readResults.SelectMany(p => p.lines).Select(p => p.text));

Detect Text (OCR)

CustomHttpClient customHttpClient = new CustomHttpClient(new CustomHttpClientHandler(null));
AzureComputerVisionService azureComputerVisionService =
   new AzureComputerVisionService(null, this.AzureComputerVisionConfiguration,
   customHttpClient);
var result = 
await azureComputerVisionService.DetectTextAsync(
   new Uri(ImageWithTextUrl), 
   language: DetectImageLanguage.Spanish);
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on PTI.Microservices.Library.AzureComputerVision:

Package Downloads
PTI.Microservices.Library.AudibleTwitter

Cloud Services library designed to be consumed in Microservices

PTI.Microservices.Library.AudibleComputerVision

Cloud Services library designed to be consumed in Microservices

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.0.3 350 11/13/2022
7.0.0.2 307 11/12/2022
7.0.0.1 307 11/12/2022
7.0.0 403 11/12/2022
6.0.0-preview 211 5/17/2022
2.0.0-preview 209 7/9/2021