diff --git a/modules/features2d/include/opencv2/features2d.hpp b/modules/features2d/include/opencv2/features2d.hpp index b4c4dde712..b09fc3ac04 100644 --- a/modules/features2d/include/opencv2/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d.hpp @@ -769,6 +769,11 @@ public: CV_PROP_RW bool filterByConvexity; CV_PROP_RW float minConvexity, maxConvexity; + /** @brief Flag to enable contour collection. + If set to true, the detector will store the contours of the detected blobs in memory, + which can be retrieved after the detect() call using getBlobContours(). + @note Default value is false. + */ CV_PROP_RW bool collectContours; void read( const FileNode& fn ); @@ -782,10 +787,14 @@ public: CV_WRAP virtual SimpleBlobDetector::Params getParams() const = 0; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; + + /** @brief Returns the contours of the blobs detected during the last call to detect(). + @note The @ref Params::collectContours parameter must be set to true before calling + detect() for this method to return any data. + */ CV_WRAP virtual const std::vector >& getBlobContours() const; }; - /** @brief Class implementing the KAZE keypoint detector and descriptor extractor, described in @cite ABD12 . @note AKAZE descriptor can only be used with KAZE or AKAZE keypoints .. [ABD12] KAZE Features. Pablo