Comments (9)
Hello Jeff. The Axis enumeration represents an axis in the Camera Space (measured in meters).
If you pass it as a parameter in the Angle method, for example, the specified axis will be ignored for the angle calculation. Let me know if you need any further assistance.
from vitruvius.
What I'm trying to do is get body relative angles and it seems like what Angle is providing is screen/camera relative angles. For instance I'd like to measure the pitch/elevation of my arm which shouldn't change as I spin around in a chair if I'm holding my arm straight out in front of me.
from vitruvius.
Could you please paste the code you are using for this?
from vitruvius.
I was trying to get body relative elbow yaw doing something like this:
double elbowYaw = body.Joints[JointType.ShoulderRight].Angle(body.Joints[JointType.SpineShoulder], body.Joints[JointType.ElbowRight], Axis.Z);
I tried using the different axes but since they're relative to the camera (and not the body or gravity) I don't think think this is the right path.
from vitruvius.
Thank you. Could you also send me a video of the movement and the proper
position?
On Tue, 13 Sep 2016 at 22:49, JeffBail [email protected] wrote:
I was trying to get body relative elbow yaw doing something like this:
double elbowYaw = body.Joints[JointType.ShoulderRight].Angle(body.Joints[JointType.SpineShoulder], body.Joints[JointType.ElbowRight], Axis.Z);
I tried using the different axes but since they're relative to the camera
(and not the body or gravity) I don't think think this is the right path.—
You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAiV-OEoXozghishmw1sd6ueNGJm7Uz1ks5qpv5EgaJpZM4J75u8
.Vangos Pterneas
http://pterneas.com
from vitruvius.
Here's a quick video. What I'm looking for is the elevation of my arm which should change as I move them up and down but not as I rotate my body or my arms. I'm thinking I might need to do a rotation correction like this.
from vitruvius.
Now it's clear to me. So, to read the angle regardless of the rotation of the body, you need to measure it by considering all of the axis. Would the following code work for you?
var start = body.Joints[JointType.SpineShoulder].Position;
var center = body.Joints[JointType.ShoulderRight].Position;
var end = body.Joints[JointType.ElbowRight].Position;
var angle = center.Angle(start, end);
You may also do this:
var angle = 180.0 - center.Angle(start, end);
from vitruvius.
I'm pretty sure that's still going to be measuring in screen/camera space and not body/floor/gravity space. So for instance if I stand with my body facing the camera and point my arm at the camera and then move it down by my side the angle doesn't change much. If I rotate my body 90 degrees and do the same motion the values sweep through a large range.
from vitruvius.
I have a pretty good solution in Unity based on the JoinOrientationBasics-Unity example. I'm simply looking up a child of the SkeletonModel, in this case "ElbowRight", that is already converted into Unity coordinates and extracting the yaw as:
Vector3.Angle(elbowRight.transform.up, Vector3.right);
from vitruvius.
Related Issues (19)
- Constants.cs missing HOT 2
- Update Vitruvius NuGet package with latest Kinect v1 version HOT 4
- Broken project at Kinect v2/WPF/VitruviusTest HOT 3
- Bug at KinectViewer control HOT 1
- v1 test app: Moving backwards at depth mode freezes display HOT 8
- GreenScreen sample on WPF is not working HOT 2
- Add FlipHorizontally and FlipVertically to viewer control HOT 4
- Toggle Skeleton at Kinect v2 WPF demo leaves back garbage HOT 3
- Problem getting gesture type HOT 2
- Joint selector
- using vitruvius library HOT 2
- kinect and arduino HOT 4
- warning on runtime HOT 10
- Project not run in visual studio for kinect v2 HOT 4
- General Question HOT 2
- Error on XAML file HOT 1
- Reusing code between v2 WPF and v2 WinRT versions HOT 10
- Rename solutions/projects to show target platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitruvius.