Skip to content

Commit

Permalink
Making sure visualization image is set even when no face is detected.
Browse files Browse the repository at this point in the history
  • Loading branch information
TadasBaltrusaitis committed Aug 3, 2018
1 parent eec7403 commit 65b2b7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gui/OpenFaceOffline/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ private void ProcessIndividualImages(ImageReader reader)

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>();
Expand Down Expand Up @@ -401,6 +403,8 @@ private void ProcessIndividualImages(ImageReader reader)

}

recorder.SetObservationVisualization(visualizer_of.GetVisImage());

frame = new RawImage(reader.GetNextImage());
gray_frame = new RawImage(reader.GetCurrentFrameGray());

Expand Down

0 comments on commit 65b2b7c

Please sign in to comment.