Udostępnij za pośrednictwem


ImageFeatureValue.VideoFrame Property

Definition

Gets the video frame.

public:
 property VideoFrame ^ VideoFrame { VideoFrame ^ get(); };
VideoFrame VideoFrame();
public VideoFrame VideoFrame { get; }
var videoFrame = imageFeatureValue.videoFrame;
Public ReadOnly Property VideoFrame As VideoFrame

Property Value

The video frame.

Examples

The following trivial example shows how you could create an ImageFeatureValue from a VideoFrame, and then later how you could get the VideoFrame from which an ImageFeatureValue was created.

#include <winrt/Windows.AI.MachineLearning.h>
#include <winrt/Windows.Media.h>
using namespace winrt;
using namespace Windows::AI::MachineLearning;
using namespace Windows::Media;

...

ImageFeatureValue CreateInputFeature(VideoFrame videoFrame)
{
	ImageFeatureValue imageFeatureValue{ ImageFeatureValue::CreateFromVideoFrame(videoFrame) };
	return imageFeatureValue;
}

VideoFrame GetVideoFrame(ImageFeatureValue imageFeatureValue)
{
	VideoFrame videoFrame{ imageFeatureValue.VideoFrame() };
	return videoFrame;
}

Remarks

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

Applies to