Analyze Images with Computer Vision Service

Image Analysis Features

Question

You have a large set of images.

In order to get insights from those images, you plan to use Computer Vision service.

With image analysis, you identify visual features such as the image contains a dog or the image is a scenery.

Review the code below and complete it by choosing visual features that are offered by image analysis API.

However, they are missing in the code snippet (select three answer choices)

public static async Task AnalyzeImageUrl(ComputerVisionClient client, string imageUrl) {  List<VisualFeatureTypes?> features = new List<VisualFeatureTypes?>() { VisualFeatureTypes.Categories, VisualFeatureTypes.Description, VisualFeatureTypes.Faces, VisualFeatureTypes……………………..., VisualFeatureTypes……………………., VisualFeatureTypes.Adult, VisualFeatureTypes.Color, VisualFeatureTypes…………………….., VisualFeatureTypes.Objects }; } 

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: A, C and D

Here is the completed code

&lt;pre class="brush:java;"&gt;public static async Task AnalyzeImageUrl(ComputerVisionClient client, string imageUrl)

{

List&amp;lt;VisualFeatureTypes?&amp;gt; features = new List&amp;lt;VisualFeatureTypes?&amp;gt;()

{

VisualFeatureTypes.Categories, VisualFeatureTypes.Description,

VisualFeatureTypes.Faces, VisualFeatureTypes.ImageType,

VisualFeatureTypes.Tags, VisualFeatureTypes.Adult,

VisualFeatureTypes.Color, VisualFeatureTypes.Brands,

VisualFeatureTypes.Objects.

};

}

&lt;/pre&gt;Option A is correct because Tags is one of the features offered by image analysis API.

Using tags you can categorize the objects.

Option B is incorrect because the rectangle is the value provided through the feature.

It is not a feature of the image analysis API.

Option C is correct because Brands is one of the features offered by image analysis API.

This capability offers to identify major brands through their logos.

Option D is correct because ImageType is one of the features offered by image analysis API.

ImageType feature is used to identify if the image is a clip art or line drawing.

Option E is incorrect because Confidence is a value of some of the features of image analysis API.

It is not a feature of the image analysis API.

Reference:

To learn more about image analysis features, use the link given below:

The code snippet provided is a C# method that uses the Microsoft Azure Computer Vision API to analyze an image given its URL. The method defines a list of visual features that the API should extract from the image. The missing visual features that need to be added to the code snippet are:

A. Tags - The Computer Vision API can extract tags that describe the content of an image, such as objects, scenes, and activities. Tags provide a high-level summary of an image and can be used for search, filtering, and organizing images. To add this feature to the code snippet, we can include VisualFeatureTypes.Tags in the list of features.

B. Rectangle - The Computer Vision API can detect and locate objects within an image and return the position and size of a bounding box around each object. This is useful for object recognition, tracking, and segmentation. To add this feature to the code snippet, we can include VisualFeatureTypes.Objects in the list of features and set the DetectOrientation parameter to true.

C. Brands - The Computer Vision API can recognize logos, trademarks, and products within an image and return the brand name and confidence score. This is useful for marketing, advertising, and intellectual property analysis. To add this feature to the code snippet, we can include VisualFeatureTypes.Brands in the list of features.

D. ImageType - The Computer Vision API can determine the type of an image, such as a photograph, clipart, or line drawing, and return a confidence score. This is useful for content filtering, copyright compliance, and image search. To add this feature to the code snippet, we can include VisualFeatureTypes.ImageType in the list of features.

E. Confidence - The Computer Vision API returns a confidence score for each visual feature that indicates the level of certainty that the API has in its analysis. This score can be used to filter or rank the results based on their reliability. To add this feature to the code snippet, we can include VisualFeatureTypes.Adult in the list of features and set the Details parameter to true.

In summary, the updated code snippet would look like this:

<pre class="brush:java;"> public static async Task AnalyzeImageUrl(ComputerVisionClient client, string imageUrl) { List&amp;lt;VisualFeatureTypes?&amp;gt; features = new List&amp;lt;VisualFeatureTypes?&amp;gt;() { VisualFeatureTypes.Categories, VisualFeatureTypes.Description, VisualFeatureTypes.Faces, VisualFeatureTypes.Tags, VisualFeatureTypes.Brands, VisualFeatureTypes.Adult, VisualFeatureTypes.Color, VisualFeatureTypes.ImageType, VisualFeatureTypes.Objects, VisualFeatureTypes.Confidence }; } </pre>

By including these visual features in the list, the Computer Vision API will provide a rich set of insights into the content of the image, including its objects, scenes, brands, and type, along with their confidence scores.