Share via


ImageVariableDescriptorPreview クラス

定義

非推奨になりました。 イメージ記述子情報を表します。

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
継承
Object Platform::Object IInspectable ImageVariableDescriptorPreview
属性
実装

Windows の要件

デバイス ファミリ
Windows 10, version 1803 (10.0.17134.0 で導入)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (v1.0 で導入)

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

 }

注釈

警告

これは非推奨の API です。 代わりに Windows.AI.MachineLearning 名前空間を 使用してください。

プロパティ

BitmapPixelFormat

非推奨になりました。 イメージのピクセル形式を取得します。

Description

非推奨になりました。 イメージ変数の説明を取得します。

Height

非推奨になりました。 イメージ変数の高さを取得します。

IsRequired

非推奨になりました。 イメージ変数が必要かどうかを取得します。

ModelFeatureKind

非推奨になりました。 変数のデータ型を取得します。

Name

非推奨になりました。 イメージ変数の名前を取得します。

Width

非推奨になりました。 イメージ変数の幅を取得します。

適用対象