/// <summary> /// Gets the category info on a stream of images via the <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API.</a>. /// </summary> /// <param name="source">The source stream of images.</param> /// <param name="subscriptionKey">The Azure subscription key to use.</param> /// <param name="region">The region for the Azure subscription.</param> /// <param name="deliveryPolicy">An optional delivery policy.</param> /// <param name="name">An optional name for the stream operator.</param> /// <returns>A stream of category info.</returns> /// <remarks> /// A <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// subscription key is required to use this operator. For more information, see the full direct API for. /// <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// </remarks> public static IProducer <IList <Category> > GetCategories( this IProducer <Shared <Image> > source, string subscriptionKey, string region, DeliveryPolicy <Shared <Image> > deliveryPolicy = null, string name = nameof(GetCategories)) => source.GetImageAnalyzerInfo(subscriptionKey, region, VisualFeatureTypes.Categories, ia => ia?.Categories, deliveryPolicy, name);
/// <summary> /// Gets the color info on a stream of images via the <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API.</a>. /// </summary> /// <param name="source">The source stream of images.</param> /// <param name="subscriptionKey">The Azure subscription key to use.</param> /// <param name="region">The region for the Azure subscription.</param> /// <param name="deliveryPolicy">An optional delivery policy.</param> /// <param name="name">An optional name for the stream operator.</param> /// <returns>A stream of color info.</returns> /// <remarks> /// A <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// subscription key is required to use this operator. For more information, see the full direct API for. /// <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// </remarks> public static IProducer <ColorInfo> GetColor( this IProducer <Shared <Image> > source, string subscriptionKey, string region, DeliveryPolicy <Shared <Image> > deliveryPolicy = null, string name = nameof(GetColor)) => source.GetImageAnalyzerInfo(subscriptionKey, region, VisualFeatureTypes.Color, ia => ia?.Color, deliveryPolicy, name);
/// <summary> /// Gets the image description details on a stream of images via the <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API.</a>. /// </summary> /// <param name="source">The source stream of images.</param> /// <param name="subscriptionKey">The Azure subscription key to use.</param> /// <param name="region">The region for the Azure subscription.</param> /// <param name="deliveryPolicy">An optional delivery policy.</param> /// <param name="name">An optional name for the stream operator.</param> /// <returns>A stream of image description details.</returns> /// <remarks> /// A <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// subscription key is required to use this operator. For more information, see the full direct API for. /// <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">Microsoft Cognitive Services Vision API</a> /// </remarks> public static IProducer <ImageDescriptionDetails> GetDescription( this IProducer <Shared <Image> > source, string subscriptionKey, string region, DeliveryPolicy <Shared <Image> > deliveryPolicy = null, string name = nameof(GetDescription)) => source.GetImageAnalyzerInfo(subscriptionKey, region, VisualFeatureTypes.Description, ia => ia?.Description, deliveryPolicy, name);