Kinect elevation angle override - c#

Is there a way to override the elevation angle property of the Kinect device?
As far as I know, the device is calculating this angle with internal sensor and using its value to improve user detection and tracking.
What I want is to mount the Kinect on the ceiling and point it straight down to the ground, then I would somehow try to set the elevation angle to 0 and fool him into thinking that it is placed in a normal position, thus maybe improving the tracking of the user that is lying on the ground underneath the sensor.

Related

How to smooth move an object with GPS coords

i want to use android GPS coords to make a camera motion in unity
i have made a ar game that use Gyro as camera rotation an now what i want is to walk around unity virtual world, i know that GPS coords is degrees then should not work as is, however, someone know a formula to make its work? ive downloaded this plugin but they convert a littlest decimal degrees to a thousand "meters"
https://github.com/MichaelTaylor3D/UnityGPSConverter/blob/master/GPSEncoder.cs

Move coordinate system in wpf

The coordinate system in viewport3D in wpf is fixed at the center of the screen with positive X-axis being rightward, positive Y-axis upwards and Z-axis pointing outwards. All the calculations in transform are being made with respect to this transform. My question is, how can I change the position and orientation of this coordinate system in my code dynamically.
The requirement is, I have two wheels rolling on the ground. But when the wheels take a 90 degree turn, the axes get interchanged. So, If I could shift and orient this coordinate system, I can tackle this problem.

Recognize if an arm is swinging/moving towards Kinect sensor or away from it

I am trying to figure out how to recognize if a person's arm is swinging/moving towards or away from the Kinect. I'm thinking it is much like a hit or punch towards the sensor.
The depth changes as the arm is going toward or away from the sensor, but how can this gesture be recognized?
I'm using the Kinect for Windows (older version) and SDK 1.8. I have also looked at EMGU (C# wrapper for OpenCV).
Any help answering this question would be greatly appriciated.
You can check and use Tracking Users with Kinect Skeletal Tracking and Channel 9s tutorials.
1 . Start with a base position of the user.
2 . Save the positions of the arm joints (e.g. schoulder left, elbow left, wrist left and hand left).
3 . The saved positions of step 2 are your reference points. Use these to calculate a swing move (e.g. (handLeftNew.z-value < handLeftReference.z-value), so movement towards Kinect).
Code sample
// get the joint
Joint leftHand = skeleton.Joints[JointType.HandLeft];
// get the individual points of the left hand
double lefttX = leftHand.Position.X;
double leftY = leftHand.Position.Y;
double leftZ = leftHand.Position.Z;

How to automatically change kinect sensor angle?

Is it possible to change the elevation angle of the kinect motor automatically?
I mean, till now I have this code (c#):
private void CameraAngleSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
int angle = (int)CameraAngleSlider.Value;
KinectSensorManager.ElevationAngle = angle;
}
and I change the angle manually using a slider called CameraAngleSlider.
Just an example: I would imagine that when the kinect start session, I place in front of the kinect and the sensor tries to adjust the angle related to my position.
This should be perfectly possible, however you will have to program this manually and take into account that the adjustment is not very fast. Also the kinect sensors don't push any data while it is adjusting its angle.
You have 2 situations:
1) the skeleton is already being tracked
=> move the angle up when the head is too close to the top of the screen
=> move the angle down when the head is under half the screen heigth
2) no skeleton being tracked
=> you will have to guess.. I'd suggest moving the angle up and down untill you get a tracked skeleton (and abort after a few tries so it doens't just keep adjusting)
There is no flag or function you can set on the Kinect to have it seek out the best position for tracking, based on player position. The Kinect does detect clipping and can be queried as to if a portion of the player is out of the FOV.
The two functions that will allow you to detect clipping of the skeleton are:
FrameEdges Enumeration
Skeleton.ClippedEdges
Depending on how your application is operation you can monitor either one of these and, when clipping of the Skeleton is detected, adjust the KinectSensor.ElevationAngle accordingly.

Kinect wrist/hand joints position changing depending on palm size

I'm creating Kinect mouse aplication. The idea is to hand/wrist kinect joint, as a source for cursor position, and finger detection to perform clicks, holds etc.
I got finger detection and palm gesture recognition working and here I found my blocker:
position of wrist/hand joint is changing when I make palm gesture, for instance when i change from open palm to fist.
Is there any workaround for this issue?
I'm using Kinect SDK 1.5 and EmguCV in this wpf aplication
Thanks Jerdak for your suggestion.
I modified it a bit and the result is pretty nice in my opinion.
I'm calculating vector between elbow and wrist position, normalizing it and then multiplying by fixed arm length.
Then I'm just adding vector to elbow position.
Edit:
After bit more testing this approach works almost perfect, only trouble is that elbow joint can "bounce" too...

Categories

Resources