public void CutSnippets(string outputFolder, HgdData hgdData) { Console.WriteLine($"Buffered Issues Count: {hgdData.BufferedUsabilityIssues.Count}"); for (int index = 0; index < hgdData.BufferedUsabilityIssues.Count; index++) { if (float.IsNaN(hgdData.BufferedUsabilityIssues[index])) { continue; } string videoPath = outputFolder; if (!videoPath.EndsWith("\\")) { videoPath += "\\"; } float startTime = index / _video.Fps; while (!float.IsNaN(hgdData.BufferedUsabilityIssues[index])) { index++; } float endTime = index / _video.Fps; videoPath += ShortTimeToString(startTime); videoPath += "_"; videoPath += ShortTimeToString(endTime); videoPath += ".avi"; CutVideo(videoPath, startTime, endTime); } }
public HandDetector(BeGazeData beGazeData, Video video, BackgroundWorker backgroundWorker) { BeGazeData = beGazeData; Video = video; _backgroundWorker = backgroundWorker; HgdData = new HgdData(); StopBool = false; }