-
Notifications
You must be signed in to change notification settings - Fork 5
webNI Server Command
webNI Server will send data after recive request from the client.
All the request from client should be string. If the request is process successfully, the server will send the data in binary, which should recive as ArrayBuffer in JavaScript.
If some error happens, Server will send the error message in string.
The webNI.js has provide a basic example how to use these request command in JavaScript.
Current version webNI Server supports the following request:
-
get depth_listGet the size of depth map.
The return data is a size 2
Uint16Array. Example: [ 320 240 ] -
get user_listGet the UserId list of users.
The return data is a
Uint16Array, each user take 2 elements. The first element is UserId, the second element is the status of the user. If the status value is 3, the user skeleton is tracked. If there is no user, the array will have 1 element, whcih value is 0. -
get user <id> skeleton 2DGet the skeleton data of user <id> in depth coordinate. The <id> could get by
get user_list.The return data is a size 45
Float32Array. Every 3 elements is a group, which mean a 2D position of a joint. The 1st and 2nd element are [ x, y ], and the 3rd element is the confidence of this joint, the value will be [0-1].There are 15 joints, the order is: HEAD, NECK, LEFT_SHOULDER, RIGHT_SHOULDER, LEFT_ELBOW, RIGHT_ELBOW, LEFT_HAND, RIGHT_HAND, TORSO, LEFT_HIP, RIGHT_HIP, LEFT_KNEE, RIGHT_KNEE, LEFT_FOOT, RIGHT_FOOT.
-
get user <id> skeleton 3DGet the skeleton data of user <id> in world coordinate. The <id> could get by
get user_list.The return data is a size 60
Float32Array, Every 4 elements is a group, which mean a 2D position of a joint. The first 3 elements are [ x, y, z ], and the 4th element is the confidence of this joint, the value will be [0-1].There are 15 joints, the order is: HEAD, NECK, LEFT_SHOULDER, RIGHT_SHOULDER, LEFT_ELBOW, RIGHT_ELBOW, LEFT_HAND, RIGHT_HAND, TORSO, LEFT_HIP, RIGHT_HIP, LEFT_KNEE, RIGHT_KNEE, LEFT_FOOT, RIGHT_FOOT.
-
get user <id> joint <joint_name> 2DGet position of joint <joint_name> of user <id> in depth coordinate. The <id> could get by
get user_list. The <joint_name> could be:head,neck,lshoulder,rshoulder,lelbow,relbow,lhand,rhand,torso,lhip,rhip,lknee,rknee,lfoot,rfoot.The return data is a size 3
Float32Array, which mean x, y and confidence. -
get user <id> joint <joint_name> 3DGet position of joint <joint_name> of user <id> in world coordinate. The <id> could get by
get user_list. The <joint_name> could be:head,neck,lshoulder,rshoulder,lelbow,relbow,lhand,rhand,torso,lhip,rhip,lknee,rknee,lfoot,rfoot.The return data is a size 4
Float32Array, which mean x, y, z and confidence.