diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-06 00:02:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-06 00:02:38 +0100 |
commit | 327204880f9153fec9645db68406767af854dde0 (patch) | |
tree | 922e5b4f54cf31601308e0c4591558ff5afecf5f /tracker-pt/module/point_extractor.cpp | |
parent | 7c8fd6294ffa533923e4efbc38583e017a7ccd72 (diff) |
tracker/pt: don't mask out pixels below threshold
Diffstat (limited to 'tracker-pt/module/point_extractor.cpp')
-rw-r--r-- | tracker-pt/module/point_extractor.cpp | 6 |
1 files changed, 2 insertions, 4 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; |