last day (15 days later) » 

16:44
hello
Could you sort it out>
?
One sec lemme look at the algorithm and then Ill help you
Sure
As i told you,
I am finding the angle which the line joining the shoulders is making with the x axis of Kinect
So you make a line connecting the shoulders then get its location and try and find the angle
16:47
I get the line as a vector
and I take the x axis vector
then I find the angle
How often do you make the call to do this algorithm? If it is every frame then it will only count small amounts because it is constantly updating
it is for every frame
but that should not happen
Why would it not happen?
I am just trying to modify the D2D sample C++ to get this running
why would it give small values then?
Ill post an answer one second
16:50
Sure
I have to ask you a few more questions, if u have time
:)
tell me when u r done
Hey , i realised i was missing double angle1=angle*180.0/3.14;
but now I am getting values in the range of -33 to -57
and when I am facing Kinect straight, I get it as maximum, that is , -57
Also the sign does not change when I turn left or right, it always remains negative
So it goes: -33:0:-57?
16:59
no
-33 to -57(when I am straight) and then again to -33
so -33:-57:-33
yes
We can get positive values by subtracting vector 2 from 1
but actually it should be: negative , then 0 (when straight) and then positive
Yeah I know
Please check
:)
I posted my answer try that and see if it works
17:07
where do I find the function allframesready?
It might be skeletalframesready
Lemme update it tho since I understand better now
There is nothing of that sort
I am using the D2D sample
there are process_skeleton, draw_skeleton and draw_bone
ignore that edit accidently pressed post
Sure
I dont think there would be a problem with the per frame call
Yeah I see that now working on your new problem
@AakashAnuj Where is your code?
17:15
See I am just editing that D2D sample C++ code
included with KInect
No what function
ihttp://ideone.com/3fN6rk
check here
Then you would put that code in DrawSkeleton
let me try, but I really dont think that values can get mixed
in a per frame call'
please add me on gmail
It would be great if we could be in touch
17:19
that is the place where I am putting my code
Shall i try with that frame thing?
I don't think you need to anymore
hmm
wait, lemme try
with that as well
There is a big challenge trying that
It says value is uninitialized
wait, i can initialize it globally
:)
Haha Im almost done
:P
tried that
that does not work, i told you values would not have got merged
Any results?
Almost one second
17:34
sure
There.
Hello...
yes
There?
Yeah
You are wring in that edit.. I am using dot product on the numerator
The angle between 2 vectors = a.b/(mod a*mod b)
right?
yeah
But you are doing
ange = (a-b).(1,0,0)/(mod(a-b) * mod(1,0,0)
17:43
No
(a-b) is my first vector
so that is fine
That is what I am defining my first vector to be: the line joining the shoulders
Wait are you moving side to side or turning
turning
I am trying to find the angle by which I turn
oh ok
So my angle calculation is right
(a-b) is one of my vectors
and the other is the x-axis of the sensor
I see what you were doing now.... Wait a sec
17:46
Sure
there?
Ok now check
no doesnt work
why should I take the average?
I want the angle between the vector joining the shoulders
see its like:
left vector + wanted vector = right vector
so the wanted vector= right-left
correct?
aere you there?
u went away?
there?
18:16
??
18:30
sorry I left for lunch
But that doesn't mean the vector is in the middle
eg. left(10,0,0) - right(18,0,0) = (-8,0,0)
eg2. left(10,0,0) + right(18,0,0) / 2 = (14,0,0)
8 is the difference but not the average of them

last day (15 days later) »