Skip to content

Commit 9e5c348

Browse files
committed
Remove framesProcessed, curr_frame_num, read FLAGS_fps
1 parent 97ddb5a commit 9e5c348

File tree

6 files changed

+3
-11
lines changed

6 files changed

+3
-11
lines changed

demos/background_subtraction_demo/cpp_gapi/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,10 @@ int main(int argc, char *argv[]) {
164164
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
165165

166166
bool isStart = true;
167-
uint64_t curr_frame_num = 0;
168167
const auto startTime = std::chrono::steady_clock::now();
169168
pipeline.start();
170169

171170
while(pipeline.pull(cv::gout(output))) {
172-
++curr_frame_num;
173171
presenter.drawGraphs(output);
174172
if (isStart) {
175173
metrics.update(startTime, output, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX,

demos/gaze_estimation_demo/cpp/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ int main(int argc, char* argv[]) {
113113
}
114114

115115
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
116-
uint32_t framesProcessed = 0;
117116
cv::Size graphSize{frame.cols / 4, 60};
118117
Presenter presenter(FLAGS_u, frame.rows - graphSize.height - 10, graphSize);
119118

@@ -143,7 +142,6 @@ int main(int argc, char* argv[]) {
143142
}
144143
}
145144

146-
framesProcessed++;
147145
videoWriter.write(frame);
148146
if (!FLAGS_no_show) {
149147
cv::imshow(windowName, frame);

demos/interactive_face_detection_demo/cpp/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(int argc, char *argv[]) {
8181
visualizer.enableEmotionBar(emotionsDetector.emotionsVec);
8282
}
8383

84-
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
84+
LazyVideoWriter videoWriter{FLAGS_o, FLAGS_fps > 0.0 ? FLAGS_fps : cap->fps(), FLAGS_limit};
8585

8686
// Detecting all faces on the first frame and reading the next one
8787
faceDetector.submitRequest(frame);

demos/pedestrian_tracker_demo/cpp/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ int main(int argc, char **argv) {
180180
cv::Size firstFrameSize = frame.size();
181181

182182
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
183-
uint32_t framesProcessed = 0;
184183
cv::Size graphSize{static_cast<int>(frame.cols / 4), 60};
185184
Presenter presenter(FLAGS_u, 10, graphSize);
186185

@@ -266,7 +265,6 @@ int main(int argc, char **argv) {
266265
presenter.drawGraphs(frame);
267266
metrics.update(startTime, frame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX, 0.65);
268267

269-
framesProcessed++;
270268
videoWriter.write(frame);
271269
if (should_show) {
272270
cv::imshow("dbg", frame);

demos/smart_classroom_demo/cpp/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Visualizer {
8989
}
9090
}
9191

92-
void Show(size_t framesProcessed) {
92+
void Show() {
9393
if (enabled_) {
9494
cv::imshow(main_window_name_, frame_);
9595
}
@@ -909,7 +909,7 @@ int main(int argc, char* argv[]) {
909909

910910
++total_num_frames;
911911

912-
sc_visualizer.Show(total_num_frames);
912+
sc_visualizer.Show();
913913

914914
logger.FinalizeFrameRecord();
915915
}

demos/text_detection_demo/cpp/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ int main(int argc, char *argv[]) {
196196
}
197197

198198
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
199-
uint32_t framesProcessed = 0;
200199
cv::Size graphSize{static_cast<int>(image.cols / 4), 60};
201200
Presenter presenter(FLAGS_u, image.rows - graphSize.height - 10, graphSize);
202201

@@ -334,7 +333,6 @@ int main(int argc, char *argv[]) {
334333
presenter.drawGraphs(demoImage);
335334
metrics.update(startTime, demoImage, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX, 0.65);
336335

337-
framesProcessed++;
338336
videoWriter.write(demoImage);
339337
if (!FLAGS_no_show) {
340338
cv::imshow("Press ESC or Q to exit", demoImage);

0 commit comments

Comments
 (0)