diff options
-rw-r--r-- | FTNoIR_Tracker_Base/ftnoir_tracker_base.h | 2 | ||||
-rw-r--r-- | FTNoIR_Tracker_Base/ftnoir_tracker_sm_types.h | 1 | ||||
-rw-r--r-- | FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp | 7 |
3 files changed, 9 insertions, 1 deletions
diff --git a/FTNoIR_Tracker_Base/ftnoir_tracker_base.h b/FTNoIR_Tracker_Base/ftnoir_tracker_base.h index f06a726f..debd58e5 100644 --- a/FTNoIR_Tracker_Base/ftnoir_tracker_base.h +++ b/FTNoIR_Tracker_Base/ftnoir_tracker_base.h @@ -39,6 +39,7 @@ #pragma pack(push, 2)
struct THeadPoseData {
double x, y, z, yaw, pitch, roll;
+ long frame_number;
};
#pragma pack(pop)
@@ -64,6 +65,7 @@ public: position.yaw = 0.0f;
position.pitch = 0.0f;
position.roll = 0.0f;
+ position.frame_number = 0;
}
T6DOF operator-( T6DOF &other ) {
return T6DOF(position.x - other.position.x, position.y - other.position.y, position.z - other.position.z,
diff --git a/FTNoIR_Tracker_Base/ftnoir_tracker_sm_types.h b/FTNoIR_Tracker_Base/ftnoir_tracker_sm_types.h index e01a73bf..1767cb94 100644 --- a/FTNoIR_Tracker_Base/ftnoir_tracker_sm_types.h +++ b/FTNoIR_Tracker_Base/ftnoir_tracker_sm_types.h @@ -22,6 +22,7 @@ struct SMMemMap { int par_val_int; // Value of parameter, indicated by 'command'
int par_val_float;
int initial_filter_level; // Internal faceAPI Filter level
+ int handshake;
};
typedef SMMemMap * PSMMemMap;
diff --git a/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp b/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp index ed7ae426..181a0e1d 100644 --- a/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp +++ b/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp @@ -111,7 +111,12 @@ bool FTNoIR_Tracker_SM::GiveHeadPoseData(THeadPoseData *data) data->yaw = pMemData->data.new_pose.head_rot.y_rads * 57.295781f; // From rads to degrees
data->pitch = pMemData->data.new_pose.head_rot.x_rads * 57.295781f;
data->roll = pMemData->data.new_pose.head_rot.z_rads * 57.295781f;
-
+
+ //
+ // Reset the handshake, to let faceAPI know we're still here!
+ //
+ pMemData->handshake = 0;
+
ReleaseMutex(hSMMutex);
return ( pMemData->data.new_pose.confidence > 0 );
}
|