ImageVariableDescriptorPreview Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deprecated. Represents the image descriptor information.
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
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v1.0)
|
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 |
Deprecated. Gets the pixel format of the image. |
Description |
Deprecated. Gets the description of the image variable. |
Height |
Deprecated. Gets the height of the image variable. |
IsRequired |
Deprecated. Gets whether the image variable is required. |
ModelFeatureKind |
Deprecated. Gets the data type of the variable. |
Name |
Deprecated. Gets the name of the image variable. |
Width |
Deprecated. Gets the width of the image variable. |