From 8b90db3f25039c4a14bd0b6e7542355a250823f5 Mon Sep 17 00:00:00 2001 From: mworchel Date: Thu, 25 Jan 2018 13:34:12 +0100 Subject: [PATCH] Add mask support to SimpleBlobDetector --- modules/features2d/src/blobdetector.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/features2d/src/blobdetector.cpp b/modules/features2d/src/blobdetector.cpp index 36aac90144..0c5cd309d5 100644 --- a/modules/features2d/src/blobdetector.cpp +++ b/modules/features2d/src/blobdetector.cpp @@ -272,9 +272,8 @@ void SimpleBlobDetector::findBlobs(const cv::Mat &image, const cv::Mat &binaryIm #endif } -void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector& keypoints, const cv::Mat&) const +void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector& keypoints, const cv::Mat& mask) const { - //TODO: support mask keypoints.clear(); Mat grayscaleImage; if (image.channels() == 3) @@ -355,6 +354,11 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector