From 993e6b18966af927563398e04c516a6fcafd8123 Mon Sep 17 00:00:00 2001 From: Wei Shuai Date: Wed, 7 Feb 2018 12:05:03 +0800 Subject: 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 --- tracker-wii/wii_point_extractor.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'tracker-wii/wii_point_extractor.cpp') 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& points) { - //const cv::Mat& frame = frame_.as_const()->mat; const struct wii_info& wii = frame_.as_const()->wii; cv::Mat& preview_frame = *preview_frame_.as(); - //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; } } -- cgit v1.2.3