Some fixes with recordings
This commit is contained in:
parent
0ffc272ff4
commit
8da705452f
3 changed files with 16 additions and 4 deletions
|
@ -227,7 +227,7 @@ namespace OpenFaceOffline
|
|||
VisualizeFeatures(frame, visualizer_of, landmark_detector.CalculateAllLandmarks(), detection_succeeding, true, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), progress);
|
||||
|
||||
// Record an observation
|
||||
RecordObservation(recorder, visualizer_of.GetVisImage(), detection_succeeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy());
|
||||
RecordObservation(recorder, visualizer_of.GetVisImage(), detection_succeeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), reader.GetTimestamp());
|
||||
|
||||
while (thread_running & thread_paused && skip_frames == 0)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ namespace OpenFaceOffline
|
|||
VisualizeFeatures(frame, visualizer_of, landmarks, detection_succeeding, i == 0, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), progress);
|
||||
|
||||
// Record an observation
|
||||
RecordObservation(recorder, visualizer_of.GetVisImage(), detection_succeeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy());
|
||||
RecordObservation(recorder, visualizer_of.GetVisImage(), detection_succeeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), 0);
|
||||
|
||||
}
|
||||
|
||||
|
@ -354,9 +354,11 @@ namespace OpenFaceOffline
|
|||
|
||||
}
|
||||
|
||||
private void RecordObservation(RecorderOpenFace recorder, RawImage vis_image, bool success, float fx, float fy, float cx, float cy)
|
||||
private void RecordObservation(RecorderOpenFace recorder, RawImage vis_image, bool success, float fx, float fy, float cx, float cy, double timestamp)
|
||||
{
|
||||
|
||||
recorder.SetObservationTimestamp(timestamp);
|
||||
|
||||
double confidence = landmark_detector.GetConfidence();
|
||||
|
||||
List<double> pose = new List<double>();
|
||||
|
@ -366,7 +368,7 @@ namespace OpenFaceOffline
|
|||
List<Tuple<double, double>> landmarks_2D = landmark_detector.CalculateAllLandmarks();
|
||||
List<Tuple<double, double, double>> landmarks_3D = landmark_detector.Calculate3DLandmarks(fx, fy, cx, cy);
|
||||
List<double> global_params = landmark_detector.GetRigidParams();
|
||||
List<double> local_params = landmark_detector.GetParams();
|
||||
List<double> local_params = landmark_detector.GetNonRigidParams();
|
||||
|
||||
recorder.SetObservationLandmarks(landmarks_2D, landmarks_3D, global_params, local_params, confidence, success);
|
||||
|
||||
|
|
|
@ -148,6 +148,11 @@ namespace UtilitiesOF {
|
|||
}
|
||||
|
||||
// Setting the observations
|
||||
void SetObservationTimestamp(double timestamp)
|
||||
{
|
||||
m_recorder->SetObservationTimestamp(timestamp);
|
||||
}
|
||||
|
||||
void SetObservationPose(List<double>^ pose)
|
||||
{
|
||||
cv::Vec6d pose_vec(pose[0], pose[1], pose[2], pose[3], pose[4], pose[5]);
|
||||
|
|
|
@ -159,6 +159,11 @@ namespace UtilitiesOF {
|
|||
return m_rgb_frame;
|
||||
}
|
||||
|
||||
double GetTimestamp()
|
||||
{
|
||||
return m_sequence_capture->time_stamp;
|
||||
}
|
||||
|
||||
System::String^ GetName()
|
||||
{
|
||||
std::string filename = m_sequence_capture->name;
|
||||
|
|
Loading…
Reference in a new issue