Towards recording visualizations and cleaning old interop code.
This commit is contained in:
parent
85262b72c7
commit
2513688463
2 changed files with 10 additions and 5 deletions
|
@ -433,7 +433,7 @@ namespace OpenFaceOffline
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RecordObservation(RecorderOpenFace recorder, 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 confidence = clnf_model.GetConfidence();
|
double confidence = clnf_model.GetConfidence();
|
||||||
|
@ -465,10 +465,10 @@ namespace OpenFaceOffline
|
||||||
var hog_feature = face_analyser.GetLatestHOGFeature();
|
var hog_feature = face_analyser.GetLatestHOGFeature();
|
||||||
recorder.SetObservationHOG(success, hog_feature, face_analyser.GetHOGRows(), face_analyser.GetHOGCols(), face_analyser.GetHOGChannels());
|
recorder.SetObservationHOG(success, hog_feature, face_analyser.GetHOGRows(), face_analyser.GetHOGCols(), face_analyser.GetHOGChannels());
|
||||||
|
|
||||||
|
recorder.SetObservationVisualization(vis_image);
|
||||||
|
|
||||||
recorder.WriteObservation();
|
recorder.WriteObservation();
|
||||||
|
|
||||||
// TODO
|
|
||||||
//open_face_rec.SetObservationVisualization(visualizer.GetVisImage());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,7 +494,6 @@ namespace OpenFaceOffline
|
||||||
double scale = 0;
|
double scale = 0;
|
||||||
|
|
||||||
// Helps with recording and showing the visualizations
|
// Helps with recording and showing the visualizations
|
||||||
visualizer.SetObservationFaceAlign(face_analyser.GetLatestAlignedFace());
|
|
||||||
visualizer.SetObservationHOG(face_analyser.GetLatestHOGFeature(), face_analyser.GetHOGRows(), face_analyser.GetHOGCols());
|
visualizer.SetObservationHOG(face_analyser.GetLatestHOGFeature(), face_analyser.GetHOGRows(), face_analyser.GetHOGCols());
|
||||||
visualizer.SetObservationLandmarks(landmarks, confidence); // Set confidence to high to make sure we always visualize
|
visualizer.SetObservationLandmarks(landmarks, confidence); // Set confidence to high to make sure we always visualize
|
||||||
visualizer.SetObservationPose(pose, confidence);
|
visualizer.SetObservationPose(pose, confidence);
|
||||||
|
|
|
@ -176,6 +176,12 @@ namespace UtilitiesOF {
|
||||||
m_recorder->SetObservationFaceAlign(aligned_face_image->Mat);
|
m_recorder->SetObservationFaceAlign(aligned_face_image->Mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetObservationVisualization(OpenCVWrappers::RawImage^ vis_image)
|
||||||
|
{
|
||||||
|
m_recorder->SetObservationVisualization(vis_image->Mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetObservationHOG(bool success, OpenCVWrappers::RawImage^ aligned_face_image, int num_cols, int num_rows, int num_channels)
|
void SetObservationHOG(bool success, OpenCVWrappers::RawImage^ aligned_face_image, int num_cols, int num_rows, int num_channels)
|
||||||
{
|
{
|
||||||
m_recorder->SetObservationHOG(success, aligned_face_image->Mat, num_cols, num_rows, num_channels);
|
m_recorder->SetObservationHOG(success, aligned_face_image->Mat, num_cols, num_rows, num_channels);
|
||||||
|
|
Loading…
Reference in a new issue