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_;
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
virtual ~OpenNiUserTrackerThread()
Destructor.
void new_user(XnUserID id)
Notify of new user.
Fawkes library namespace.
Thread aspect to get access to the OpenNI context.
Thread class encapsulation of pthreads.
void calibration_end(XnUserID id, bool success)
Notify of calibration end.
void pose_end(XnUserID id, const char *pose_name)
Notify of pose detection end.
virtual void init()
Initialize the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to use blocked timing.
virtual void finalize()
Finalize the thread.
OpenNiUserTrackerThread()
Constructor.
Shared memory image buffer.
Thread aspect to log output.
virtual void loop()
Code to execute in the thread.
Thread aspect to access configuration data.
void lost_user(XnUserID id)
Notify of lost user.
OpenNI User Tracker Thread.
HumanSkeletonInterface Fawkes BlackBoard Interface.
void pose_start(XnUserID id, const char *pose_name)
Notify of detected pose.
void calibration_start(XnUserID id)
Notify of calibration start.