ImageVariableDescriptorPreview ImageVariableDescriptorPreview ImageVariableDescriptorPreview ImageVariableDescriptorPreview ImageVariableDescriptorPreview Class

Definition

Deprecated. Represents the image descriptor information.

public : sealed class ImageVariableDescriptorPreview : IImageVariableDescriptorPreview, ILearningModelVariableDescriptorPreview
struct winrt::Windows::AI::MachineLearning::Preview::ImageVariableDescriptorPreview : IImageVariableDescriptorPreview, ILearningModelVariableDescriptorPreview
public sealed class ImageVariableDescriptorPreview : IImageVariableDescriptorPreview, ILearningModelVariableDescriptorPreview
Public NotInheritable Class ImageVariableDescriptorPreview Implements IImageVariableDescriptorPreview, ILearningModelVariableDescriptorPreview
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced v1)

Examples

public void Evaluator(LearningModelPreview model)
{
    // Retrieve the first input feature which is an image
    ILearningModelVariableDescriptorPreview inputImageFeatureDescription = model.Description.InputFeatures.FirstOrDefault(feature=>feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image);

    ImageVariableDescriptorPreview imageDescriptor = (ImageVariableDescriptorPreview)inputImageFeatureDescription;

    // Ensure the input feature handles the format RGBA8
    if (imageDescriptor.BitmapPixelFormat != BitmapPixelFormat.Rgba8)
    {
        Console.WriteLine($"Input Feature Name: {imageDescriptor.Name}. Format not supported.");
    }

 }

Remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.

Properties

BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat

Deprecated. Gets the pixel format of the image.

Description Description Description Description Description

Deprecated. Gets the description of the image variable.

Height Height Height Height Height
IsRequired IsRequired IsRequired IsRequired IsRequired
ModelFeatureKind ModelFeatureKind ModelFeatureKind ModelFeatureKind ModelFeatureKind

Deprecated. Gets the data type of the variable.

Name Name Name Name Name

Deprecated. Gets the name of the image variable.

Width Width Width Width Width