summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wii_point_extractor.cpp
diff options
context:
space:
mode:
authorWei Shuai <cpuwolf@sina.com>2018-02-08 06:51:33 +0800
committerGitHub <noreply@github.com>2018-02-08 06:51:33 +0800
commit938d7987047179d3bac4a4fcaaed9fbbe3424bbf (patch)
treee3ccfcbb2720af4ac05f31dfcb3c3bd919d3491e /tracker-wii/wii_point_extractor.cpp
parent48b0266eb73f233fa0c031b7b9dab96f476be141 (diff)
parentb62f4a94932785203ad133565575bc5cf0f0f408 (diff)
Merge pull request #742 from cpuwolf/autopair4
tracker/wii: add WIImote auto-pair function
Diffstat (limited to 'tracker-wii/wii_point_extractor.cpp')
-rw-r--r--tracker-wii/wii_point_extractor.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp
index 99d4d375..215d50b8 100644
--- a/tracker-wii/wii_point_extractor.cpp
+++ b/tracker-wii/wii_point_extractor.cpp
@@ -109,35 +109,16 @@ void WIIPointExtractor::_draw_bg(cv::Mat& preview_frame, const struct wii_info &
1);
}
-
void WIIPointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_frame_, std::vector<vec2>& points)
{
- //const cv::Mat& frame = frame_.as_const<WIIFrame>()->mat;
const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii;
cv::Mat& preview_frame = *preview_frame_.as<WIIPreview>();
- //create a blank frame
- //cv::Mat blank_frame(preview_frame.cols, preview_frame.rows, CV_8UC3, cv::Scalar(0, 0, 0));
- //cv::cvtColor(_frame, _frame2, cv::COLOR_BGR2BGRA);
- //cv::resize(blank_frame, preview_frame, cv::Size(preview_frame.cols, preview_frame.rows), 0, 0, cv::INTER_NEAREST);
-
switch (wii.status) {
case wii_cam_data_change:
_draw_bg(preview_frame, wii);
_draw_points(preview_frame, wii, points);
break;
- case wii_cam_wait_for_connect:
- char txtbuf[64];
- sprintf(txtbuf, "%s", "wait for WIImote");
- //draw wait text
- cv::putText(preview_frame,
- txtbuf,
- cv::Point(preview_frame.cols / 10, preview_frame.rows / 2),
- cv::FONT_HERSHEY_SIMPLEX,
- 1,
- cv::Scalar(255, 255, 255),
- 1);
- break;
}
}