共用方式為


ImageFeatureValue.VideoFrame 屬性

定義

取得視訊畫面。

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

屬性值

視訊框架。

範例

下列 Trivial 範例示範如何從VideoFrame建立ImageFeatureValue,然後稍後如何取得建立 ImageFeatureValueVideoFrame

#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;
}

備註

Windows Server

若要在 Windows Server 上使用此 API,您必須搭配桌面體驗使用 Windows Server 2019。

執行緒安全

此 API 是安全線程。

適用於