Example #1
0
 /// <summary>
 /// This operation extracts a rich set of visual features based on the image
 /// content.
 /// Two input methods are supported -- (1) Uploading an image or (2) specifying
 /// an image URL. Within your request, there is an optional parameter to allow
 /// you to choose which features to return. By default, image categories are
 /// returned in the response.
 /// A successful response will be returned in JSON. If the request failed, the
 /// response will contain an error code and a message to help understand what
 /// went wrong.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='url'>
 /// Publicly reachable URL of an image.
 /// </param>
 /// <param name='visualFeatures'>
 /// A string indicating what visual feature types to return. Multiple values
 /// should be comma-separated. Valid visual feature types include: Categories -
 /// categorizes image content according to a taxonomy defined in documentation.
 /// Tags - tags the image with a detailed list of words related to the image
 /// content. Description - describes the image content with a complete English
 /// sentence. Faces - detects if faces are present. If present, generate
 /// coordinates, gender and age. ImageType - detects if image is clipart or a
 /// line drawing. Color - determines the accent color, dominant color, and
 /// whether an image is black&amp;white. Adult - detects if the image is
 /// pornographic in nature (depicts nudity or a sex act).  Sexually suggestive
 /// content is also detected. Objects - detects various objects within an
 /// image, including the approximate location. The Objects argument is only
 /// available in English. Brands - detects various brands within an image,
 /// including the approximate location. The Brands argument is only available
 /// in English.
 /// </param>
 /// <param name='details'>
 /// A string indicating which domain-specific details to return. Multiple
 /// values should be comma-separated. Valid visual feature types include:
 /// Celebrities - identifies celebrities if detected in the image, Landmarks -
 /// identifies notable landmarks in the image.
 /// </param>
 /// <param name='language'>
 /// The desired language for output generation. If this parameter is not
 /// specified, the default value is &amp;quot;en&amp;quot;.Supported
 /// languages:en - English, Default. es - Spanish, ja - Japanese, pt -
 /// Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
 /// 'ja', 'pt', 'zh'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ImageAnalysis> AnalyzeImageAsync(this IComputerVisionClient operations, string url, IList <VisualFeatureTypes> visualFeatures = default(IList <VisualFeatureTypes>), IList <Details> details = default(IList <Details>), string language = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AnalyzeImageWithHttpMessagesAsync(url, visualFeatures, details, language, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }