diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-20 21:04:56 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:32:10 +0100 |
commit | 582db45e356d5e7eb90606107c54db2e25cec644 (patch) | |
tree | 5e8200d9072dc90e5d503031722440c8d59a5c92 /tracker-wii/wii_point_extractor.cpp | |
parent | 1b1e0f4ef7ae31e2721e6a32a84548e66f4244ef (diff) |
tracker/{pt,wii}: fix leading underscore identifiers
Diffstat (limited to 'tracker-wii/wii_point_extractor.cpp')
-rw-r--r-- | tracker-wii/wii_point_extractor.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp index 1be6049b..27f53cb1 100644 --- a/tracker-wii/wii_point_extractor.cpp +++ b/tracker-wii/wii_point_extractor.cpp @@ -40,7 +40,7 @@ WIIPointExtractor::WIIPointExtractor(const QString& module_name) : s(module_name } //define a temp draw function -void WIIPointExtractor::_draw_point(cv::Mat& preview_frame, const vec2& p, const cv::Scalar& color, int thinkness) +void WIIPointExtractor::draw_point(cv::Mat& preview_frame, const vec2& p, const cv::Scalar& color, int thickness) { static constexpr int len = 9; @@ -51,18 +51,18 @@ void WIIPointExtractor::_draw_point(cv::Mat& preview_frame, const vec2& p, const cv::Point(p2.x - len, p2.y), cv::Point(p2.x + len, p2.y), color, - thinkness); + thickness); cv::line(preview_frame, cv::Point(p2.x, p2.y - len), cv::Point(p2.x, p2.y + len), color, - thinkness); + thickness); } -bool WIIPointExtractor::_draw_points(cv::Mat& preview_frame, const struct wii_info &wii, std::vector<vec2>& points) +bool WIIPointExtractor::draw_points(cv::Mat& preview_frame, const struct wii_info& wii, std::vector<vec2>& points) { - const float W = 1024.0f; - const float H = 768.0f; + constexpr int W = 1024; + constexpr int H = 768; points.reserve(4); points.clear(); @@ -81,7 +81,7 @@ bool WIIPointExtractor::_draw_points(cv::Mat& preview_frame, const struct wii_in std::tie(dt[0], dt[1]) = to_screen_pos(RX, RY, W, H); points.push_back(dt); - _draw_point(preview_frame, dt, cv::Scalar(0, 255, 0), dot.isize); + draw_point(preview_frame, dt, cv::Scalar(0, 255, 0), dot.isize); } } const bool success = points.size() >= PointModel::N_POINTS; @@ -89,7 +89,7 @@ bool WIIPointExtractor::_draw_points(cv::Mat& preview_frame, const struct wii_in return success; } -void WIIPointExtractor::_draw_bg(cv::Mat& preview_frame, const struct wii_info &wii) +void WIIPointExtractor::draw_bg(cv::Mat& preview_frame, const struct wii_info& wii) { //draw battery status cv::line(preview_frame, @@ -114,11 +114,12 @@ void WIIPointExtractor::extract_points(const pt_frame& frame_, pt_preview& previ const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii; cv::Mat& preview_frame = *preview_frame_.as<WIIPreview>(); - switch (wii.status) { - case wii_cam_data_change: - _draw_bg(preview_frame, wii); - _draw_points(preview_frame, wii, points); - break; - } + switch (wii.status) + { + case wii_cam_data_change: + draw_bg(preview_frame, wii); + draw_points(preview_frame, wii, points); + break; + } } |