Basic Image AlgorithmS Library
2.8.0
|
Blob detector for 'Difference Of Means'-blobs (so this is not a binary blob detector). More...
#include <FeatureDetector/BlobDetectorDOM.hh>
Public Member Functions | |
BlobDetectorDOM () | |
standard constructor More... | |
int | Detect (BIAS::Image< StorageType > &image, std::vector< BIAS::BIASBlob > &blobs) |
Detect and return blobs in an image. More... | |
int | DrawInImage (BIAS::Image< StorageType > &image, StorageType *color) |
draws the detected blobs in image More... | |
float | GetAbsoluteDOM (int x, int y, int halfLevelSize) |
void | GetBlobsAsHomgPoint2D (std::vector< HomgPoint2D > &blobs, std::vector< float > &qual_vec) |
Returns the blobs generated by Detect() as HomgPoin2D vector and quality vector (Like feature points). More... | |
int | GetMaxNumBlobs () |
return maximum number of blobs More... | |
void | SetCabin (int cabinsPerAxis, int maxPopulation) |
Allow just a maximum number of DOM extrema in one cabin. More... | |
void | SetMaxNumBlobs (const int maxnum) |
void | SetMaxSize (unsigned int maxSize) |
Set maximum size of blobs. More... | |
void | SetMinSize (unsigned int minSize) |
Set minimum size of blobs. More... | |
void | SetSeedGenerationParams (unsigned int minSeedSize, unsigned int maxSeedSize, unsigned int seedSizeStep) |
If the automatic seed generation is used (by passing an empty vector to the Detect() function), the seeds are generated by this parameters. More... | |
void | SetThreshold (float threshold) |
Set threshold for blob detection. More... | |
virtual | ~BlobDetectorDOM () |
standard destructor More... | |
Protected Member Functions | |
void | CreateIntegralImage (Image< StorageType > &in) |
double | EvalIntegralImage (int xA, int yA, int xB, int yB) |
void | GenerateAndOptimize (std::vector< HomgPoint2D > &pos_vec, std::vector< float > &qual_vec) |
float | GetDOM (int x, int y, int halfLevelSize) |
HomgPoint2D | GetLocalMaximum (int x, int y, int halfLevelSize) |
void | refineBlobPosAndSize (Image< StorageType > img) |
Protected Attributes | |
std::vector< float > | blobQualityVec_ |
float | diffThreshold_ |
int | dMaxNumBlobs_ |
maximum number of corners to return More... | |
std::vector< HomgPoint2D > | generatedBlobs_ |
unsigned int | height_ |
double * | intImg_ |
unsigned int | maxBlobSize_ |
unsigned int | maximumBinPopulation_ |
unsigned int | maxSeedSize_ |
unsigned int | minBlobSize_ |
unsigned int | minSeedSize_ |
unsigned int | numberOfBins_ |
unsigned int | seedSizeStep_ |
unsigned int | similarityThreshold_ |
unsigned int | width_ |
Blob detector for 'Difference Of Means'-blobs (so this is not a binary blob detector).
Blob detection is done by distributing starting points in the DOM-Space (3dimensional, image dimensions + scale). An element of the DOM space is given by the difference between the mean value of a square area at a certain position + size and the mean value of the surrounding square (double sized). Initial seeds in the DOM space are used to converge to local minima => DOM blobs. This implementation uses sum-images (integral images) to speed up the calculation.
Definition at line 34 of file BlobDetectorDOM.hh.
BlobDetectorDOM::BlobDetectorDOM | ( | ) |
standard constructor
Definition at line 16 of file BlobDetectorDOM.cpp.
|
virtual |
standard destructor
Definition at line 31 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 352 of file BlobDetectorDOM.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), and BIAS::ImageBase::GetWidth().
|
virtual |
Detect and return blobs in an image.
[in] | image | the image to detect blobs in |
[out] | vector | to store the blobs in. If the vector is empty, seeds are generated automatically according to the settings. If the vector allready contains blobs, these blobs are optimized. |
Implements BIAS::BlobDetectorBase< StorageType >.
Definition at line 36 of file BlobDetectorDOM.cpp.
References BIAS::BIASBlob::centerofmass, BIAS::BIASBlob::LR, BIAS::BIASBlob::UL, and BIAS::BIASBlob::weight.
int BlobDetectorDOM::DrawInImage | ( | BIAS::Image< StorageType > & | image, |
StorageType * | color | ||
) |
draws the detected blobs in image
image | image the blobs are drawn in here |
Definition at line 71 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 379 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 124 of file BlobDetectorDOM.cpp.
float BlobDetectorDOM::GetAbsoluteDOM | ( | int | x, |
int | y, | ||
int | halfLevelSize | ||
) |
Definition at line 326 of file BlobDetectorDOM.cpp.
void BlobDetectorDOM::GetBlobsAsHomgPoint2D | ( | std::vector< HomgPoint2D > & | blobs, |
std::vector< float > & | qual_vec | ||
) |
Returns the blobs generated by Detect() as HomgPoin2D vector and quality vector (Like feature points).
Get blobs as HomgPoin2D vector
blobs | Location vector, 3rd component is the size |
qual_vec | Quality vector, contains the actual difference of means |
Definition at line 116 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 304 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 263 of file BlobDetectorDOM.cpp.
|
inlineinherited |
return maximum number of blobs
Definition at line 82 of file BlobDetectorBase.hh.
|
protected |
Definition at line 191 of file BlobDetectorDOM.cpp.
References BIAS::ImageBase::GetChannelCount(), and BIAS::Image< StorageType >::GetImageDataArray().
void BlobDetectorDOM::SetCabin | ( | int | cabinsPerAxis, |
int | maxPopulation | ||
) |
Allow just a maximum number of DOM extrema in one cabin.
Set the cabin-optimization parameters
cabinsPerAxis | The number of cabins per axis, i.e. the square root of the overall number of cabins |
maxPopulation | the maximum number of DOM extrema in one cabin |
Definition at line 87 of file BlobDetectorDOM.cpp.
|
inlineinherited |
Definition at line 74 of file BlobDetectorBase.hh.
void BlobDetectorDOM::SetMaxSize | ( | unsigned int | maxSize | ) |
Set maximum size of blobs.
maxsize | Maximum size in pixel |
Definition at line 99 of file BlobDetectorDOM.cpp.
void BlobDetectorDOM::SetMinSize | ( | unsigned int | minSize | ) |
Set minimum size of blobs.
minsize | Minimum size in pixel |
Definition at line 93 of file BlobDetectorDOM.cpp.
void BlobDetectorDOM::SetSeedGenerationParams | ( | unsigned int | minSeedSize, |
unsigned int | maxSeedSize, | ||
unsigned int | seedSizeStep | ||
) |
If the automatic seed generation is used (by passing an empty vector to the Detect() function), the seeds are generated by this parameters.
Set seed parameters for auto seed generation
minSeedSize | Size of the smallest blob seeds |
maxSeedSize | Size of the largest blob seeds |
seedStepSize | Step size to get from minSeedSize to maxSeedSize |
Definition at line 105 of file BlobDetectorDOM.cpp.
void BlobDetectorDOM::SetThreshold | ( | float | threshold | ) |
Set threshold for blob detection.
threshold | Difference threshold between background and blob content |
Definition at line 82 of file BlobDetectorDOM.cpp.
|
protected |
Definition at line 136 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 126 of file BlobDetectorDOM.hh.
|
protectedinherited |
maximum number of corners to return
Definition at line 89 of file BlobDetectorBase.hh.
|
protected |
Definition at line 135 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 148 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 146 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 128 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 133 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 130 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 127 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 129 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 132 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 131 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 134 of file BlobDetectorDOM.hh.
|
protected |
Definition at line 147 of file BlobDetectorDOM.hh.