Starting work on persistent visualization for images.
This commit is contained in:
parent
65ee5009ad
commit
cddfd887a0
1 changed files with 13 additions and 6 deletions
|
@ -295,7 +295,7 @@ namespace OpenFaceOffline
|
||||||
gaze_analyser.AddNextFrame(clnf_model, detectionSucceeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy());
|
gaze_analyser.AddNextFrame(clnf_model, detectionSucceeding, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy());
|
||||||
|
|
||||||
// Only the final face will contain the details
|
// Only the final face will contain the details
|
||||||
VisualizeFeatures(frame, landmarks, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), progress);
|
VisualizeFeatures(frame, landmarks, i==0, reader.GetFx(), reader.GetFy(), reader.GetCx(), reader.GetCy(), progress);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ namespace OpenFaceOffline
|
||||||
|
|
||||||
List<Tuple<double, double>> landmarks = clnf_model.CalculateVisibleLandmarks();
|
List<Tuple<double, double>> landmarks = clnf_model.CalculateVisibleLandmarks();
|
||||||
|
|
||||||
VisualizeFeatures(frame, landmarks, fx, fy, cx, cy, progress);
|
VisualizeFeatures(frame, landmarks, true, fx, fy, cx, cy, progress);
|
||||||
|
|
||||||
while (thread_running & thread_paused && skip_frames == 0)
|
while (thread_running & thread_paused && skip_frames == 0)
|
||||||
{
|
{
|
||||||
|
@ -412,7 +412,7 @@ namespace OpenFaceOffline
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VisualizeFeatures(RawImage frame, List<Tuple<double, double>> landmarks, double fx, double fy, double cx, double cy, double progress)
|
private void VisualizeFeatures(RawImage frame, List<Tuple<double, double>> landmarks, bool new_image, double fx, double fy, double cx, double cy, double progress)
|
||||||
{
|
{
|
||||||
List<Tuple<Point, Point>> lines = null;
|
List<Tuple<Point, Point>> lines = null;
|
||||||
List<Tuple<double, double>> eye_landmarks = null;
|
List<Tuple<double, double>> eye_landmarks = null;
|
||||||
|
@ -513,8 +513,15 @@ namespace OpenFaceOffline
|
||||||
video.GazeLines.Clear();
|
video.GazeLines.Clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(new_image)
|
||||||
{
|
{
|
||||||
video.OverlayLines = lines;
|
video.OverlayLines = lines;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
video.OverlayLines.AddRange(lines.GetRange(0, lines.Count));
|
||||||
|
}
|
||||||
|
|
||||||
List<Point> landmark_points = new List<Point>();
|
List<Point> landmark_points = new List<Point>();
|
||||||
foreach (var p in landmarks)
|
foreach (var p in landmarks)
|
||||||
|
|
Loading…
Reference in a new issue