meshonline / kinect-openni-bvh-saver

This project is based on OpenNI2, NITE2, and OpenCV2, it will automatically save many skeleton animation clips to bvh files.
MIT License
207 stars 57 forks source link

Stereo Camera application #9

Open Jack-No1 opened 2 years ago

Jack-No1 commented 2 years ago

Hi, i'm implementing this code in my project where i need to obtain the quaternion value for each joint, i 'm using stereo vision to obtaining the 3d points of each joints. so my question, is this also working for camera sensor or is there could be a difference of kinect although i got the reconstructed coordonates. sorry for the question cause i don't have a deep knowledge about the quaterneon so i'm still learning.

meshonline commented 2 years ago

'kinectbvh.h' use the functions in 'vet_math.h' to build quaternion from scratch.

m = mat3_from_axis(vx, vy, vz); q = quat_from_mat3(m);

The first line build a matrix from two major axis(vx, vy, vz), where vz is a zero vector. The second line build quaternion from the matrix.

Jack-No1 commented 2 years ago

in function GetEulers in kinectbvh.h , why inverting the quaternion parent Joint and what is the function "quat_left_multiply( ...)" ; i am stuck here.

meshonline commented 2 years ago

In vector multiply operation, left multiply means that you multiply the left vector with the right vector. For example: left_multiply(a, b) = b * a We invert the parent and multiply the child to get the relative value (local value).

xorespesp commented 1 year ago

The first line build a matrix from two major axis(vx, vy, vz), where vz is a zero vector. The second line build quaternion from the matrix.

Does "matrix" in the sentence above mean a rotation matrix?

I'm currently struggling to understand the part that creates these "matrices" for each joint.. (in function CreateQuaternionInformation in kinectbvh.h)

Thanks

meshonline commented 1 year ago

Yes, "matrix" mean a rotation matrix.