summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-04-27 07:28:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-04-27 07:28:55 +0200
commit546cfb5ad52dcfe1421d1af5e7baeada588ac735 (patch)
tree20c266e33e08ca281c93942ebf7f7e0c49e6d3e0 /tracker-pt/point_extractor.h
parent9bd2c6921d8d9ccec50d926b4b3eea5d05b79db9 (diff)
tracker/pt: experimental non-white color removal
It's enabled only for automatic thresholding. With it on, it's possible to keep tracking in normal light conditions without changing gain or exposure beforehand. It won't function on badly overexposed images, or with other bright white colors in the frame. It should function on somewhat overexposed images. CPU usage is somewhat high, even taking advantage of all OpenCV SIMD goodness as per the code. We can revert the change if user reception is bad.
Diffstat (limited to 'tracker-pt/point_extractor.h')
-rwxr-xr-x[-rw-r--r--]tracker-pt/point_extractor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h
index 3e4661f9..5a3630be 100644..100755
--- a/tracker-pt/point_extractor.h
+++ b/tracker-pt/point_extractor.h
@@ -25,15 +25,22 @@ public:
const std::vector<cv::Vec2f> &extract_points(cv::Mat &frame);
int get_n_points() { QMutexLocker l(&mtx); return points.size(); }
PointExtractor();
+ ~PointExtractor();
settings_pt s;
private:
+ void gray_square_diff(const cv::Mat& frame, cv::Mat& frame_gray);
+
enum { hist_c = 2 };
std::vector<cv::Vec2f> points;
QMutex mtx;
cv::Mat frame_gray;
+ cv::Mat frame_gray_tmp;
cv::Mat frame_bin;
cv::Mat hist;
+ std::vector<cv::Mat> gray_split_channels;
+ std::vector<cv::Mat> gray_absdiff_channels;
+ cv::Mat float_absdiff_channel;
enum { max_blobs = 16 };