summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-01-06 00:02:19 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-01-06 00:02:38 +0100
commit327204880f9153fec9645db68406767af854dde0 (patch)
tree922e5b4f54cf31601308e0c4591558ff5afecf5f
parent7c8fd6294ffa533923e4efbc38583e017a7ccd72 (diff)
tracker/pt: don't mask out pixels below threshold
-rw-r--r--tracker-pt/module/point_extractor.cpp6
-rw-r--r--tracker-pt/module/point_extractor.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index 804245d2..6e79ef24 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -98,7 +98,6 @@ void PointExtractor::ensure_buffers(const cv::Mat& frame)
frame_gray.create(H, W);
frame_bin.create(H, W);
- frame_gray_unmasked.create(H, W);
}
void PointExtractor::extract_single_channel(const cv::Mat& orig_frame, int idx, cv::Mat1b& dest)
@@ -303,15 +302,14 @@ void PointExtractor::extract_points(const pt_frame& frame_,
const cv::Mat& frame = frame_.as_const<Frame>()->mat;
ensure_buffers(frame);
- color_to_grayscale(frame, frame_gray_unmasked);
+ color_to_grayscale(frame, frame_gray);
#if defined PREVIEW
cv::imshow("capture", frame_gray);
cv::waitKey(1);
#endif
- threshold_image(frame_gray_unmasked, frame_bin);
- frame_gray_unmasked.copyTo(frame_gray, frame_bin);
+ threshold_image(frame_gray, frame_bin);
const f region_size_min = (f)s.min_point_size;
const f region_size_max = (f)s.max_point_size;
diff --git a/tracker-pt/module/point_extractor.h b/tracker-pt/module/point_extractor.h
index b1cc86d5..3f7fb4ee 100644
--- a/tracker-pt/module/point_extractor.h
+++ b/tracker-pt/module/point_extractor.h
@@ -42,7 +42,7 @@ private:
pt_settings s;
- cv::Mat1b frame_gray_unmasked, frame_bin, frame_gray;
+ cv::Mat1b frame_bin, frame_gray;
cv::Mat1f hist;
std::vector<blob> blobs;
cv::Mat1b ch[3];