Making sure visualization image is set even when no face is detected.

This commit is contained in:
Tadas Baltrusaitis
2018-08-03 10:20:56 +01:00
parent eec74034ff
commit 65b2b7c7aa

View File

@@ -362,6 +362,8 @@ namespace OpenFaceOffline
RecorderOpenFace recorder = new RecorderOpenFace(reader.GetName(), rec_params, record_root);
visualizer_of.SetImage(frame, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy());
// Detect faces here and return bounding boxes
List<Rect> face_detections = new List<Rect>();
List<float> confidences = new List<float>();
@@ -401,6 +403,8 @@ namespace OpenFaceOffline
}
recorder.SetObservationVisualization(visualizer_of.GetVisImage());
frame = new RawImage(reader.GetNextImage());
gray_frame = new RawImage(reader.GetCurrentFrameGray());