00001 #pragma once
00002
00003
00004 #ifdef ENABLE_KINECT_SDK
00005
00006
00007 #include <NuiApi.h>
00008
00009 #include "ExClass.h"
00010 #include "Vector.h"
00011
00012 #include <FaceTrackLib.h>
00013
00014
00015
00016 #pragma comment(lib, "FaceTrackLib.lib")
00017
00018
00019
00020 namespace jbxwl {
00021
00022
00023
00024
00025
00026 class CKinectFaceTracker
00027 {
00028 public:
00029 CKinectFaceTracker(void);
00030 virtual ~CKinectFaceTracker(void) { free();}
00031
00032 public:
00033 BOOL is_detected;
00034
00035 uByte* m_image;
00036 uByte* m_depth;
00037
00038 public:
00039 IFTFaceTracker* m_tracker;
00040 IFTImage* m_image_data;
00041 IFTImage* m_depth_data;
00042 IFTResult* m_result;
00043
00044 FT_SENSOR_DATA m_sensor;
00045
00046 public:
00047 void free(void);
00048 BOOL create(int width, int height, uByte* image, uByte* depth);
00049
00050 BOOL detect(FT_VECTOR3D* hint);
00051 RECT getFaceRect(void);
00052 Vector<double> getFaceEulerXYZ(void);
00053
00054 void drawFaceRect(ExCmnHead* view, int scale, BOOL mirror, int col, int line);
00055 };
00056
00057
00058 }
00059
00060
00061 #endif