Freigeben über


ImageVariableDescriptorPreview Klasse

Definition

Veraltet. Stellt die Bilddeskriptorinformationen dar.

public ref class ImageVariableDescriptorPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class ImageVariableDescriptorPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use ImageFeatureDescriptor instead of ImageVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class ImageVariableDescriptorPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class ImageVariableDescriptorPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use ImageFeatureDescriptor instead of ImageVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class ImageVariableDescriptorPreview
Public NotInheritable Class ImageVariableDescriptorPreview
Vererbung
Object Platform::Object IInspectable ImageVariableDescriptorPreview
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10, version 1803 (eingeführt in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (eingeführt in v1.0)

Beispiele

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.");
    }

 }

Hinweise

Warnung

Dies ist eine veraltete API. Verwenden Sie stattdessen den Windows.AI.MachineLearning-Namespace .

Eigenschaften

BitmapPixelFormat

Veraltet. Ruft das Pixelformat des Bilds ab.

Description

Veraltet. Ruft die Beschreibung der Bildvariablen ab.

Height

Veraltet. Ruft die Höhe der Bildvariablen ab.

IsRequired

Veraltet. Ruft ab, ob die Imagevariable erforderlich ist.

ModelFeatureKind

Veraltet. Ruft den Datentyp der Variablen ab.

Name

Veraltet. Ruft den Namen der Imagevariablen ab.

Width

Veraltet. Ruft die Breite der Bildvariablen ab.

Gilt für: