Tag: kinect

Kinect 1.8色帧和深度帧不协调

我的程序存在深度和彩色图像之间协调性差的问题。 玩家面具与人不在同一个地方(见下图)。 void _AllFreamReady(object sender, AllFramesReadyEventArgs e) { using (ColorImageFrame _colorFrame = e.OpenColorImageFrame()) { if (_colorFrame == null) //jezeli pusta ramka nie rob nic { return; } byte[] _pixels = new byte[_colorFrame.PixelDataLength]; //utworzenie tablicy pixeli dla 1 ramki obrazu o rozmiarach przechwyconej ramki z strumienia _colorFrame.CopyPixelDataTo(_pixels); //kopiujemy pixele do tablicy int _stride = _colorFrame.Width * […]

Kinect错误启用流

这是我第一次尝试制作一个使用Kinect的程序,我不知道为什么我一直得到一个null错误。 也许有人更了解KinectSDK可以提供帮助吗? public ProjKinect() { InitializeComponent(); updateSensor(0);//set current sensor as 0 since we just started } public void updateSensor(int sensorI) { refreshSensors();//see if any new ones connected if (sensorI >= sensors.Length)//if it goes to end, then repeat { sensorI = 0; } currentSensorInt = sensorI; if (activeSensor != null && activeSensor.IsRunning) { activeSensor.Stop();//stop so we […]

EmguCv TypeInitializationException由EmguCv.CV.CvInvoke引发

让我首先说我确实已经遵循了很多教程,例如整个位于EmguCv主站点上的教程,但是抛出了一个TypeInitializationException。 现在,仔细聆听,因为这里出现了非常奇怪的部分。 我首先要说的是我的问题有三个“级别”,然而,所有“级别”中的代码完全相同,即使没有任何变化。 这自然会指出我有一个引用或链接问题,但我再次尝试了不同的教程,但无济于事。 级别1(此级别产生TypeInitializationException) 我创建一个新项目,正确引用所有内容等,然后在这个新项目中编写我的代码。 在调试时,我抛出了exception,我的程序退出。 这是一个问题图片的链接: http : //prntscr.com/uychc 等级2(此等级完全正常,不会抛出任何exception) 在这个级别中,我几乎找到了EmguCv的一个示例项目(在本例中为VideoSurveilance),然后删除默认代码并将我的所有代码复制并粘贴到那里。 添加了我需要的更多参考文献后,程序运行正常。 我不能发布超过3个链接,但你必须相信我,video图片显示正确。 等级3(这个级别不会引发exception,但警告我一个人的“第一次机会”) 在这个级别中,我将整个Level 2项目复制并粘贴到另一个目录中。 找到并重新链接丢失的文件/引用后,我能够运行程序,但图片没有显示,我得到一个“类型的第一次机会exception”System.TypeInitializationException“发生在Emgu.CV.dll警告.http:/ /prntscr.com/uycmn 我目前运行Windows 7 x64(是的,我将构建选项更改为x64和x64 .dll)并运行EmguCv 2.4.9和2.4.2(在两者上测试)和Visual Studios 2010和2012(在两者上测试)。 这是它可能值得的代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; //using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using […]

我可以用kinect弄清楚肤色或体温吗?

有什么方法可以用kinect弄清楚肤色或体温吗?

如何对静态图片流(video)进行动态编码,以便将这些从C#发送到Python?

我使用Kinect SDK( C# )从Kinect 2获得Depth和Color帧,然后使用ZeroMQ将它们发送给Python客户端。 this.shorts = new ushort[ 217088]; // 512 * 424 this.depthBytes = new Byte[ 434176]; // 512 * 424 * 2 this.colorBytes = new Byte[4147200]; // 1920 * 1080 * 4 public void SendDepthFrame(DepthFrame depthFrame) { depthFrame.CopyFrameDataToArray(this.shorts); Buffer.BlockCopy(shorts, 0, this.depthBytes, 0, this.depthBytes.Length); this.depthPublisher.SendByteArray(this.depthBytes); } public void SendColorFrame(ColorFrame colorFrame, WriteableBitmap map) { […]

Kinect有不同的SDK吗?

Kinect One有不同的SDK,或者我可以使用旧的sdk和Kinect One吗? 我在网上搜索但无法找到它。 有人可以确认一下吗?

Joint.Position指的是什么?

我正在尝试使用Kinect和Kinect SDK 1.8检测用户的某些位置或手势。 为此,我打算使用Joint.Position属性提供的信息。 但是,我无法理解我正在阅读的价值观。 他们的意思是什么? 它们是关节和传感器之间的距离吗? 他们用什么单位测量?

用于点击的Kinect Grip手势

我正在使用kinect V2.0。 我需要使用抓握手势执行点击。 有没有办法处理V2.0中的Grip手势,如V1.8中的AddHandPointerGripHandler。

清理方法中出现意外的“无法访问已处置的对象”

当我关闭我的WPF应用程序时,我正面临一个令人费解的处理对象问题。 如果你发现我的逻辑中有任何错误,请指出它们。 我有一个带有update()方法的ColorManager类,如下所示。 public void Update(ColorImageFrame frame) { byte[] pixelData = new byte[frame.PixelDataLength]; frame.CopyPixelDataTo(pixelData); if (Bitmap == null) { Bitmap = new WriteableBitmap(frame.Width, frame.Height, 96, 96, PixelFormats.Bgr32, null); } // draw bitmap RaisePropertyChanged(() => Bitmap); } 我在一个单独的线程中运行此方法。 在我的MainWindow.xaml.cs我有以下内容: private void Initialise() { if (kinectSensor == null) return; // start kinect sensor kinectSensor.Start(); updateColourStreamThread = new […]

break命令后循环中多次命中

我有一个奇怪的问题。 我正在为应用程序创建一个NUI,我将一些简单的手势绑定到右箭头和左箭头。 问题是当我开始申请时。 当我第一次做出手势时,我的应用程序连续击中了2次。 之后它按我的要求100%工作。 只有开始才是问题所在。 我将两个Joints和timestamp添加到我的history结构中,该结构放入ArrayList中 this._history.Add(new HistoryItem() { timestamp = timestamp, activeHand = hand, controlJoint = controlJoint } ); 然后在foreach循环中我正在比较数据 if (Math.Abs((hand.Position.X – item.controlJoint.Position.X)) < MainWindow.treshold && Math.Abs((hand.Position.Y – item.controlJoint.Position.Y)) < MainWindow.verticalTreshold) 如果它击中了我立刻打破了lopp break; 之后我清除历史ArrayList this._history.Clear(); 所以我不明白。 为什么在开始后连续两次击中? //编辑 history ArrayList初始化 private List _history = new List(16); 在循环中 foreach (HistoryItem item in this._history) […]