summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wii_point_extractor.cpp
diff options
context:
space:
mode:
authorWei Shuai <cpuwolf@gmail.com>2018-02-07 12:05:03 +0800
committerWei Shuai <cpuwolf@gmail.com>2018-02-07 12:05:03 +0800
commit993e6b18966af927563398e04c516a6fcafd8123 (patch)
tree70a560a701429dabf624e545a4201f92e45ad087 /tracker-wii/wii_point_extractor.cpp
parent84a143aa1b9654e4133cb19016c3a95fbfb57bf2 (diff)
tracker/wii: enhance user friendly UI
1. add wii status wii_cam_wait_for_sync 2. add images show how user should do in preview window 3. reduce redundancy convertion about QImage by doing in WIIPreview Class
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;
}
}