summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:17:01 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:21:36 +0100
commit59dec5d1ee6161633c081cf1bddfed33fcc593cd (patch)
tree2c86208e36964b18ee12ee0efc49388056a4d873 /tracker-pt/point_extractor.h
parent75b9401b70405b7ce0639de00ff27386d2bc75ba (diff)
tracker/pt: use cv::Mat::reshape() to avoid memcpy
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index b085c602..d31304b9 100644
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -44,23 +44,19 @@ public:
private:
static constexpr int max_blobs = 16;
- cv::Mat frame_gray;
- cv::Mat frame_bin;
- cv::Mat hist;
- cv::Mat frame_blobs;
+ cv::Mat1b frame_gray, frame_bin, frame_blobs;
+ cv::Mat1f hist;
std::vector<blob> blobs;
- cv::Mat ch[3], ch_float[4];
+ cv::Mat1b ch[3];
void ensure_channel_buffers(const cv::Mat& orig_frame);
void ensure_buffers(const cv::Mat& frame);
void extract_single_channel(const cv::Mat& orig_frame, int idx, cv::Mat& dest);
void extract_channels(const cv::Mat& orig_frame, const int* order, int order_npairs);
- void extract_all_channels(const cv::Mat& orig_frame);
- void channels_to_float(unsigned num_channels);
- void color_to_grayscale(const cv::Mat& frame, cv::Mat& output);
- void threshold_image(const cv::Mat& frame_gray, cv::Mat& output);
+ void color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output);
+ void threshold_image(const cv::Mat& frame_gray, cv::Mat1b& output);
};
} // ns impl