Share via


ImageVariableDescriptorPreview Clase

Definición

En desuso. Representa la información del descriptor de imagen.

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
Herencia
Object Platform::Object IInspectable ImageVariableDescriptorPreview
Atributos
Implementaciones

Requisitos de Windows

Familia de dispositivos
Windows 10, version 1803 (se introdujo en la versión 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (se introdujo en la versión v1.0)

Ejemplos

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

 }

Comentarios

Advertencia

Se trata de una API en desuso. Use el espacio de nombres Windows.AI.MachineLearning en su lugar.

Propiedades

BitmapPixelFormat

En desuso. Obtiene el formato de píxel de la imagen.

Description

En desuso. Obtiene la descripción de la variable de imagen.

Height

En desuso. Obtiene el alto de la variable de imagen.

IsRequired

En desuso. Obtiene si se requiere la variable de imagen.

ModelFeatureKind

En desuso. Obtiene el tipo de datos de la variable.

Name

En desuso. Obtiene el nombre de la variable de imagen.

Width

En desuso. Obtiene el ancho de la variable de imagen.

Se aplica a