Skip to content

Commit 97ddb5a

Browse files
committed
Fix typos
1 parent 82e44b0 commit 97ddb5a

File tree

4 files changed

+8
-10
lines changed
  • demos
    • background_subtraction_demo/cpp_gapi
    • human_pose_estimation_demo/cpp
    • interactive_face_detection_demo/cpp_gapi
    • smart_classroom_demo/cpp

4 files changed

+8
-10
lines changed

demos/background_subtraction_demo/cpp_gapi/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <utils/args_helper.hpp>
77
#include <utils_gapi/stream_source.hpp>
88
#include <utils/config_factory.h>
9-
#include <utils/ocv_common.h>
9+
#include <utils/ocv_common.hpp>
1010

1111
#include <opencv2/gapi/streaming/cap.hpp>
1212
#include <opencv2/gapi/imgproc.hpp>
@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) {
161161
cv::Size graphSize{static_cast<int>(frame_size.width / 4), 60};
162162
Presenter presenter(FLAGS_u, frame_size.height - graphSize.height - 10, graphSize);
163163

164-
LayzyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
164+
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
165165

166166
bool isStart = true;
167167
uint64_t curr_frame_num = 0;

demos/human_pose_estimation_demo/cpp/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,7 @@ int main(int argc, char *argv[]) {
325325
renderMetrics.update(renderingStart);
326326
metrics.update(result->metaData->asRef<ImageMetaData>().timeStamp,
327327
outFrame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX, 0.65);
328-
if (videoWriter.isOpened() && (FLAGS_limit == 0 || framesProcessed <= FLAGS_limit - 1)) {
329-
videoWriter.write(outFrame);
330-
}
328+
videoWriter.write(outFrame);
331329
if (!FLAGS_no_show) {
332330
cv::imshow("Human Pose Estimation Results", outFrame);
333331
//--- Updating output window

demos/interactive_face_detection_demo/cpp_gapi/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ int main(int argc, char *argv[]) {
437437
stream.setSource<custom::CommonCapSrc>(cap);
438438

439439
/** Save output result **/
440-
LazyVideoWriter videoWriter{FLAGS_o, cap->fsp(), FLAGS_limit};
440+
LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
441441

442442
bool isStart = true;
443443
const auto startTime = std::chrono::steady_clock::now();

demos/smart_classroom_demo/cpp/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Visualizer {
3737
cv::Mat top_persons_;
3838
const bool enabled_;
3939
const int num_top_persons_;
40-
cv::VideoWriter& writer_;
40+
LazyVideoWriter writer_;
4141
float rect_scale_x_;
4242
float rect_scale_y_;
4343
static int const max_input_width_ = 1920;
@@ -49,7 +49,7 @@ class Visualizer {
4949
static int const margin_size_ = 5;
5050

5151
public:
52-
Visualizer(bool enabled, cv::VideoWriter& writer, int num_top_persons) :
52+
Visualizer(bool enabled, const LazyVideoWriter& writer, int num_top_persons) :
5353
enabled_(enabled), num_top_persons_(num_top_persons), writer_(writer), rect_scale_x_(0), rect_scale_y_(0) {
5454
if (!enabled_) {
5555
return;
@@ -89,12 +89,12 @@ class Visualizer {
8989
}
9090
}
9191

92-
void Show(size_t framesProcessed) const {
92+
void Show(size_t framesProcessed) {
9393
if (enabled_) {
9494
cv::imshow(main_window_name_, frame_);
9595
}
9696

97-
writer_ << frame_;
97+
writer_.write(frame_);
9898
}
9999

100100
void DrawCrop(cv::Rect roi, int id, const cv::Scalar& color) const {

0 commit comments

Comments
 (0)