简体   繁体   English

捕获单个图像并将其保存为Kinect v2

[英]Capture a single image and save it Kinect v2

I have a small problem that I am sure has an easy fix but I am having difficulty finding an example or working code. 我有一个小问题,可以肯定可以轻松解决,但是我很难找到示例或工作代码。 I am programming in Visual Studio using C#. 我正在使用C#在Visual Studio中进行编程。

I am trying to capture an image from the Kinect (v2) device. 我正在尝试从Kinect(v2)设备捕获图像。 The device is already working as its intended in my programme and is displaying the colour feed and skeletal data on screen. 该设备已经可以在我的程序中正常工作,并且正在屏幕上显示彩色进纸和骨骼数据。 When the user meets certain conditions, I want to write a method to capture 5 or so consecutive frames from the camera and save those image files somewhere on my computer. 当用户满足某些条件时,我想编写一种方法来从相机捕获5个左右连续的帧并将这些图像文件保存在我的计算机上的某个位置。

I have been looking at examples such as Capture Image from Kinect v2 Sensor but these aren't really leading anywhere! 我一直在看示例,例如从Kinect v2 Sensor捕获图像,但是这些示例并没有真正领先! I have read that I should be using CanvasBitmap method but not really sure where to take it from there? 我已经读过我应该使用CanvasBitmap方法,但不确定从哪里获取它?

Any help would be appreciated 任何帮助,将不胜感激

The ColorBasics Sample, (stored in C:\\Program Files\\Microsoft SDKs\\Kinect\\v2.0_1409\\Samples\\Managed\\ColorBasics-WPF after you have installed the Kinect v2 SDK) shows you how to store the color stream into a WriteableBitmap . 安装了Kinect v2 SDK之后,ColorBasics示例(存储在C:\\Program Files\\Microsoft SDKs\\Kinect\\v2.0_1409\\Samples\\Managed\\ColorBasics-WPF )向您展示了如何将颜色流存储到WriteableBitmap

You can then use the information from this answer to store the image. 然后,您可以使用此答案中的信息来存储图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM