23 #ifndef __PLUGINS_OPENNI_USERTRACKER_THREAD_H_
24 #define __PLUGINS_OPENNI_USERTRACKER_THREAD_H_
26 #include "utils/version.h"
28 #include <core/threading/thread.h>
29 #include <core/utils/lockptr.h>
30 #include <aspect/logging.h>
31 #include <aspect/configurable.h>
32 #include <aspect/clock.h>
33 #include <aspect/blackboard.h>
34 #include <aspect/blocked_timing.h>
35 #include <plugins/openni/aspect/openni.h>
37 #include <XnCppWrapper.h>
42 class HumanSkeletonInterface;
43 class HumanSkeletonProjectionInterface;
45 namespace firevision {
46 class SharedMemoryImageBuffer;
68 void pose_start(XnUserID
id,
const char *pose_name);
69 void pose_end(XnUserID
id,
const char *pose_name);
74 protected:
virtual void run() { Thread::run(); }
84 typedef std::map<XnUserID, UserInfo> UserMap;
86 void update_user(XnUserID
id, UserInfo &user);
87 void update_com(XnUserID
id, UserInfo &user);
90 xn::UserGenerator *__user_gen;
91 xn::DepthGenerator *__depth_gen;
93 xn::SceneMetaData *__scene_md;
94 xn::SkeletonCapability *__skelcap;
96 XnCallbackHandle __user_cb_handle;
97 #if XN_VERSION_GE(1,3,2,0)
98 XnCallbackHandle __pose_start_cb_handle;
99 XnCallbackHandle __pose_end_cb_handle;
100 XnCallbackHandle __calib_start_cb_handle;
101 XnCallbackHandle __calib_complete_cb_handle;
103 XnCallbackHandle __pose_cb_handle;
104 XnCallbackHandle __calib_cb_handle;
107 char __calib_pose_name[32];
108 bool __skel_need_calib_pose;
113 size_t __label_bufsize;