Skip to content

Commit b6ba13e

Browse files
committed
Flush results
1 parent 3f9fea1 commit b6ba13e

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

example/VideoExample.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ void VideoExample::SyncProcess()
142142

143143
WriteFrame(writer, frameInfo.m_frames[i].GetMatBGR());
144144
}
145+
if (framesCounter % 100 == 0)
146+
m_resultsLog.Flush();
145147
}
146148

147149
int64 stopLoopTime = cv::getTickCount();
@@ -242,6 +244,9 @@ void VideoExample::AsyncProcess()
242244
break;
243245

244246
++processCounter;
247+
248+
if (processCounter % 100 == 0)
249+
m_resultsLog.Flush();
245250
}
246251
stopCapture = true;
247252

example/VideoExample.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class ResultsLog
7070
m_robustIDs.insert(trackID);
7171
}
7272

73+
///
74+
void Flush()
75+
{
76+
WriteAll(true);
77+
m_frames.clear();
78+
}
79+
7380
private:
7481
std::string m_fileName;
7582
std::ofstream m_resCSV;

0 commit comments

Comments
 (0)