Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BlobDetector Class Reference

Detect blobs in image (specialized for dynamic obstacles in the costmap) More...

#include <blob_detector.h>

Inheritance diagram for BlobDetector:
Inheritance graph
[legend]

Classes

struct  Center
 

Public Member Functions

 BlobDetector (const cv::SimpleBlobDetector::Params &parameters=cv::SimpleBlobDetector::Params())
 Default constructor which optionally accepts custom parameters. More...
 
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. More...
 
const std::vector< std::vector< cv::Point > > & getContours ()
 Access contours extracted during detection stage. More...
 
void updateParameters (const cv::SimpleBlobDetector::Params &parameters)
 Update internal parameters. More...
 

Static Public Member Functions

static cv::Ptr< BlobDetectorcreate (const BlobDetector::Params &params)
 Create shared instance of the blob detector with given parameters. More...
 

Protected Member Functions

virtual void findBlobs (const cv::Mat &image, const cv::Mat &binary_image, std::vector< Center > &centers, std::vector< std::vector< cv::Point >> &cur_contours) const
 

Protected Attributes

std::vector< std::vector< cv::Point > > contours_
 
Params params_
 

Detailed Description

Detect blobs in image (specialized for dynamic obstacles in the costmap)

This class is based on OpenCV's blob detector cv::SimpleBlobDetector. It has been modified and specialized for dynamic obstacle tracking in the costmap: -> The modified version also returns contours of the blob.

See http://docs.opencv.org/trunk/d0/d7a/classcv_1_1SimpleBlobDetector.html for the original class.

Definition at line 60 of file blob_detector.h.

Constructor & Destructor Documentation

BlobDetector::BlobDetector ( const cv::SimpleBlobDetector::Params &  parameters = cv::SimpleBlobDetector::Params())

Default constructor which optionally accepts custom parameters.

Definition at line 5 of file blob_detector.cpp.

Member Function Documentation

cv::Ptr< BlobDetector > BlobDetector::create ( const BlobDetector::Params &  params)
static

Create shared instance of the blob detector with given parameters.

Definition at line 7 of file blob_detector.cpp.

void BlobDetector::detect ( const cv::Mat &  image,
std::vector< cv::KeyPoint > &  keypoints,
const cv::Mat &  mask = cv::Mat() 
)
virtual

Detects keypoints in an image and extracts contours.

In contrast to the original detect method, this extended version also extracts contours. Contours can be accessed by getContours() after invoking this method.

Todo:
The mask option is currently not implemented.
Parameters
imageimage
keypointsThe detected keypoints.
maskMask specifying where to look for keypoints (optional). It must be a 8-bit integer matrix with non-zero values in the region of interest.

Definition at line 13 of file blob_detector.cpp.

void BlobDetector::findBlobs ( const cv::Mat &  image,
const cv::Mat &  binary_image,
std::vector< Center > &  centers,
std::vector< std::vector< cv::Point >> &  cur_contours 
) const
protectedvirtual

Definition at line 93 of file blob_detector.cpp.

const std::vector<std::vector<cv::Point> >& BlobDetector::getContours ( )
inline

Access contours extracted during detection stage.

Returns
Read-only reference to the contours set of the previous detect() run

Definition at line 90 of file blob_detector.h.

void BlobDetector::updateParameters ( const cv::SimpleBlobDetector::Params &  parameters)

Update internal parameters.

Definition at line 190 of file blob_detector.cpp.

Member Data Documentation

std::vector<std::vector<cv::Point> > BlobDetector::contours_
protected

Definition at line 106 of file blob_detector.h.

Params BlobDetector::params_
protected

Definition at line 108 of file blob_detector.h.


The documentation for this class was generated from the following files:


costmap_converter
Author(s): Christoph Rösmann , Franz Albers , Otniel Rinaldo
autogenerated on Fri Jun 7 2019 21:48:43