Bagikan melalui


ImageVariableDescriptorPreview Kelas

Definisi

Dihentikan. Mewakili informasi deskriptor gambar.

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
Warisan
Object Platform::Object IInspectable ImageVariableDescriptorPreview
Atribut
Penerapan

Persyaratan Windows

Rangkaian perangkat
Windows 10, version 1803 (diperkenalkan dalam 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (diperkenalkan dalam v1.0)

Contoh

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

 }

Keterangan

Peringatan

Ini adalah API yang tidak digunakan lagi. Silakan gunakan namespace Windows.AI.MachineLearning sebagai gantinya.

Properti

BitmapPixelFormat

Dihentikan. Mendapatkan format piksel gambar.

Description

Dihentikan. Mendapatkan deskripsi variabel gambar.

Height

Dihentikan. Mendapatkan tinggi variabel gambar.

IsRequired

Dihentikan. Mendapatkan apakah variabel gambar diperlukan.

ModelFeatureKind

Dihentikan. Mendapatkan jenis data variabel.

Name

Dihentikan. Mendapatkan nama variabel gambar.

Width

Dihentikan. Mendapatkan lebar variabel gambar.

Berlaku untuk