kinect

IndexOutOfRange Exception while trying to get color values from Kinect v2 in C#

笑着哭i 提交于 2019-12-11 16:21:18
问题 I am trying to get the RGB values of each CameraSpacePoint in Kinect v2. While trying to access converted frame data, the code is throwing IndexOutOfRangeException . I found out that following lines are throwing this error: byte red = pixels[4 * pixelsBaseIndex + 0]; byte green = pixels[4 * pixelsBaseIndex + 1]; byte blue = pixels[4 * pixelsBaseIndex + 2]; byte alpha = pixels[4 * pixelsBaseIndex + 3]; Please see the complete code below: int depthWidth = kinectSensor.DepthFrameSource

OpenNI 1.5::Could not run code from documentation

落花浮王杯 提交于 2019-12-11 14:57:44
问题 I am trying to run a sample code from the OpenNI 1.5 documentation.I have imported the library required XnCppWrapper.h so that I can use C++.The code has only one error on a particular variable "bshouldrun".I know that it should be declared as something but since I am new at this and the documentation does not contain anything above the main, I dont know what to declare it as..Please help!! And thanks in advance. #include <XnOpenNI.h> #include <XnCppWrapper.h> #include <stdio.h> int main() {

Kinect Infrared Camera Not working

北城余情 提交于 2019-12-11 13:43:47
问题 I am using the Kinect 2 with the newest available SDK version 2.0. Everything works except IR, tested it with both SDK infrared demo example and Kinect Studio, both result in a black screen. I also looked at the code and capturing Kinect IR frames does not result in any errors, it just consists of all minimum values. This is quite weird, as I thought IR was used to calculate depth and I can successfully read depth information. Also, I checked (with my cellphone camera) that the IR emitter is

checking if kinect is connected or not

▼魔方 西西 提交于 2019-12-11 12:53:07
问题 I am creating a WPF/C# app that uses the kinect for moving objects but it also runs with using the mouse. Currently I comment out the kinect code for it work using the mouse. I need way to recognize whether the kinect is connected or not so I don't have to comment out code for it to use the mouse when it's not (without throwing an exception as it currently does) and use kinect when it does. How may I do that?? info: I am using official Microsoft Kinect SDKs (Downloaded about a week ago) Edit-

KinectSensor NullReferenceException

半世苍凉 提交于 2019-12-11 11:39:19
问题 A week ago, we had a working project. The following worked, without a problem on my machine (Window 8 developing in VisualStudio 2010) KinectSensor sensor = KinectSensor.KinectSensors[0]; public KinectController() { sensor.SkeletonFrameReady += runtime_SkeletonFrameReady; sensor.ColorStream.Enable(); sensor.SkeletonStream.Enable(); sensor.Start(); } This worked no problems. When my teammate pulled this down from an SVN, it broke, giving a null reference exception on ColorStream.Enable().

Kinect Skeletal Tracking Not Working

此生再无相见时 提交于 2019-12-11 11:04:40
问题 So currently I have a bool PersonDetected which is always set to false UNLESS a Skeleton is detected. But currently when a SkeletonTrackingState is marked as Tracked , but PersonDetected is still set to false. Thanks in advance My Code Skeleton skeletons = new Skeleton(); if ((skeletons.TrackingState == SkeletonTrackingState.Tracked || skeletons.TrackingState == SkeletonTrackingState.PositionOnly) & skeletons.TrackingState != SkeletonTrackingState.NotTracked) { PersonDetected = true; } 回答1: I

How ro reuse .xed file recorded by kinect studio in another application

六眼飞鱼酱① 提交于 2019-12-11 08:24:42
问题 I have several .xed files recorded by Kinect Studio. I have to use them to test my application. Do you have any idea how to do that? I didn't recorded these files using my application, but I need to check gestures used in them with my own gesture recognizer app. 回答1: Here is what I suggest : Run your app Start Kinect Studio and connect your app to it Open your xed file Hit play Your app should act as if the movie is a live kinect stream. Note that you must have a Kinect plugged in your

Is Kinect orthographic or perspective mode?

我是研究僧i 提交于 2019-12-11 07:29:36
问题 I would like to know if the Kinect capture color, depth and IR images in orthographic or perspective mode ? 回答1: While there is no clear mention of this particular information, based on my experience of using Kinect v1 and v2, I would say the following: Color and IR cameras : Perspective Both are normal RGB cameras (IR one has an IR filter) with a lens and have camera parameters, lens distortion etc. The objects in image get smaller as they go farther Depth : Orthographic Based on how the

How to make a copy of an Kinect Skeleton object to another Kinect Skeleton object

五迷三道 提交于 2019-12-11 05:53:07
问题 I am using the Kinect Toolbox, so I have a list of ReplaySkeletonFrames in my hand. I am iterating over this list, getting the first tracked skeleton and modifying some properties. As we know, when we change an object we also change the original object. I need to make a copy of an skeleton. Note: I can't use CopySkeletonDataTo() because my frame is a ReplaySkeletonFrame and not the ReplayFrame of the "normal" Kinect. I tried to make my own method that copies property by property, but some

C# and Kinect gesture time

纵饮孤独 提交于 2019-12-11 04:58:31
问题 I am currently developing some gesture recognition in C# with Kinect SDK.So far so good, the only problem being that the gesture recognition is instant. For example: i am using a messageBox to announce when i raise my hand above my head.And if i hold the hand for 2 seconds, it will open dozens of messageBoxes announcing the gesture. Is there a way to stop this? 回答1: Darren says the truth. You need to implement a stop mechanism. Kinect is analyzing everything in real time whole time so when