summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-20 05:35:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-20 05:35:49 +0200
commitd1e7df336ce101a0fd9b05e4d3b2b8d49f6caa61 (patch)
tree60772cb59866b7cb9a4d427bfd9dfa22e1915798 /tracker-pt/point_extractor.h
parentacb60d2264fb203898b16f01952cdb3498ffac20 (diff)
tracker/pt: grayscaling modes work
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rw-r--r--tracker-pt/point_extractor.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index fd32e94b..b085c602 100644
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -23,11 +23,11 @@ using namespace types;
struct blob
{
- double radius, brightness;
+ f radius, brightness;
vec2 pos;
cv::Rect rect;
- blob(double radius, const cv::Vec2d& pos, double brightness, cv::Rect &rect);
+ blob(f radius, const vec2& pos, f brightness, cv::Rect &rect);
};
class PointExtractor final
@@ -51,7 +51,16 @@ private:
std::vector<blob> blobs;
cv::Mat ch[3], ch_float[4];
- void separate_channels(cv::Mat const& orig_frame, int const* order = nullptr, int order_cnt = -1);
+ 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);
};
} // ns impl