23 #ifndef _PLUGINS_OPENNI_USERTRACKER_THREAD_H_
24 #define _PLUGINS_OPENNI_USERTRACKER_THREAD_H_
26 #include "utils/version.h"
28 #include <aspect/blackboard.h>
29 #include <aspect/blocked_timing.h>
30 #include <aspect/clock.h>
31 #include <aspect/configurable.h>
32 #include <aspect/logging.h>
33 #include <core/threading/thread.h>
34 #include <core/utils/lockptr.h>
35 #include <plugins/openni/aspect/openni.h>
37 #include <XnCppWrapper.h>
41 class HumanSkeletonInterface;
42 class HumanSkeletonProjectionInterface;
44 namespace firevision {
45 class SharedMemoryImageBuffer;
66 void pose_start(XnUserID
id,
const char *pose_name);
67 void pose_end(XnUserID
id,
const char *pose_name);
88 typedef std::map<XnUserID, UserInfo> UserMap;
90 void update_user(XnUserID
id, UserInfo &user);
91 void update_com(XnUserID
id, UserInfo &user);
94 xn::UserGenerator * user_gen_;
95 xn::DepthGenerator *depth_gen_;
97 xn::SceneMetaData * scene_md_;
98 xn::SkeletonCapability *skelcap_;
100 XnCallbackHandle user_cb_handle_;
101 #if XN_VERSION_GE(1, 3, 2, 0)
102 XnCallbackHandle pose_start_cb_handle_;
103 XnCallbackHandle pose_end_cb_handle_;
104 XnCallbackHandle calib_start_cb_handle_;
105 XnCallbackHandle calib_complete_cb_handle_;
107 XnCallbackHandle pose_cb_handle_;
108 XnCallbackHandle calib_cb_handle_;
111 char calib_pose_name_[32];
112 bool skel_need_calib_pose_;
117 size_t label_bufsize_;