43 #ifndef BLOBDETECTOR_H_ 44 #define BLOBDETECTOR_H_ 48 #include <opencv2/features2d/features2d.hpp> 64 BlobDetector(
const cv::SimpleBlobDetector::Params& parameters = cv::SimpleBlobDetector::Params());
67 static cv::Ptr<BlobDetector>
create(
const BlobDetector::Params& params);
83 virtual void detect(
const cv::Mat& image, std::vector<cv::KeyPoint>& keypoints,
84 const cv::Mat& mask = cv::Mat());
103 virtual void findBlobs(
const cv::Mat& image,
const cv::Mat& binary_image, std::vector<Center>& centers,
104 std::vector<std::vector<cv::Point>>& cur_contours)
const;
111 #endif // BLOBDETECTOR_H_ Detect blobs in image (specialized for dynamic obstacles in the costmap)
virtual void detect(const cv::Mat &image, std::vector< cv::KeyPoint > &keypoints, const cv::Mat &mask=cv::Mat())
Detects keypoints in an image and extracts contours.
void updateParameters(const cv::SimpleBlobDetector::Params ¶meters)
Update internal parameters.
virtual void findBlobs(const cv::Mat &image, const cv::Mat &binary_image, std::vector< Center > ¢ers, std::vector< std::vector< cv::Point >> &cur_contours) const
BlobDetector(const cv::SimpleBlobDetector::Params ¶meters=cv::SimpleBlobDetector::Params())
Default constructor which optionally accepts custom parameters.
const std::vector< std::vector< cv::Point > > & getContours()
Access contours extracted during detection stage.
static cv::Ptr< BlobDetector > create(const BlobDetector::Params ¶ms)
Create shared instance of the blob detector with given parameters.
std::vector< std::vector< cv::Point > > contours_