From 546cfb5ad52dcfe1421d1af5e7baeada588ac735 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 27 Apr 2016 07:28:41 +0200 Subject: 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. --- tracker-pt/point_extractor.h | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 tracker-pt/point_extractor.h (limited to 'tracker-pt/point_extractor.h') diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h old mode 100644 new mode 100755 index 3e4661f9..5a3630be --- a/tracker-pt/point_extractor.h +++ b/tracker-pt/point_extractor.h @@ -25,15 +25,22 @@ public: const std::vector &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 points; QMutex mtx; cv::Mat frame_gray; + cv::Mat frame_gray_tmp; cv::Mat frame_bin; cv::Mat hist; + std::vector gray_split_channels; + std::vector gray_absdiff_channels; + cv::Mat float_absdiff_channel; enum { max_blobs = 16 }; -- cgit v1.2.3