Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::BlobDetectorDOM< StorageType > Class Template Reference

Blob detector for 'Difference Of Means'-blobs (so this is not a binary blob detector). More...

#include <FeatureDetector/BlobDetectorDOM.hh>

+ Inheritance diagram for BIAS::BlobDetectorDOM< StorageType >:
+ Collaboration diagram for BIAS::BlobDetectorDOM< StorageType >:

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< HomgPoint2DgeneratedBlobs_
 
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_
 

Detailed Description

template<class StorageType>
class BIAS::BlobDetectorDOM< StorageType >

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.

Author
jordt 11/2009
Examples:
ExampleConstantRegion.cpp.

Definition at line 34 of file BlobDetectorDOM.hh.

Constructor & Destructor Documentation

template<class StorageType >
BlobDetectorDOM::BlobDetectorDOM ( )

standard constructor

Definition at line 16 of file BlobDetectorDOM.cpp.

template<class StorageType >
BlobDetectorDOM::~BlobDetectorDOM ( )
virtual

standard destructor

Definition at line 31 of file BlobDetectorDOM.cpp.

Member Function Documentation

template<class StorageType >
void BlobDetectorDOM::CreateIntegralImage ( Image< StorageType > &  in)
protected
template<class StorageType >
int BlobDetectorDOM::Detect ( BIAS::Image< StorageType > &  image,
std::vector< BIAS::BIASBlob > &  blobs 
)
virtual

Detect and return blobs in an image.

Parameters
[in]imagethe image to detect blobs in
[out]vectorto 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.
Returns
0 on success, -1 on failure

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.

template<class StorageType >
int BlobDetectorDOM::DrawInImage ( BIAS::Image< StorageType > &  image,
StorageType *  color 
)

draws the detected blobs in image

Parameters
imageimage the blobs are drawn in here
Returns
0 on success, -1 on failure

Definition at line 71 of file BlobDetectorDOM.cpp.

template<class StorageType >
double BlobDetectorDOM::EvalIntegralImage ( int  xA,
int  yA,
int  xB,
int  yB 
)
protected

Definition at line 379 of file BlobDetectorDOM.cpp.

template<class StorageType >
void BlobDetectorDOM::GenerateAndOptimize ( std::vector< HomgPoint2D > &  pos_vec,
std::vector< float > &  qual_vec 
)
protected

Definition at line 124 of file BlobDetectorDOM.cpp.

template<class StorageType >
float BlobDetectorDOM::GetAbsoluteDOM ( int  x,
int  y,
int  halfLevelSize 
)

Definition at line 326 of file BlobDetectorDOM.cpp.

template<class StorageType >
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

Parameters
blobsLocation vector, 3rd component is the size
qual_vecQuality vector, contains the actual difference of means

Definition at line 116 of file BlobDetectorDOM.cpp.

template<class StorageType >
float BlobDetectorDOM::GetDOM ( int  x,
int  y,
int  halfLevelSize 
)
protected

Definition at line 304 of file BlobDetectorDOM.cpp.

template<class StorageType >
HomgPoint2D BlobDetectorDOM::GetLocalMaximum ( int  x,
int  y,
int  halfLevelSize 
)
protected

Definition at line 263 of file BlobDetectorDOM.cpp.

template<class StorageType>
int BIAS::BlobDetectorBase< StorageType >::GetMaxNumBlobs ( )
inlineinherited

return maximum number of blobs

Author
ischiller

Definition at line 82 of file BlobDetectorBase.hh.

template<class StorageType >
void BlobDetectorDOM::refineBlobPosAndSize ( Image< StorageType >  img)
protected
template<class StorageType >
void BlobDetectorDOM::SetCabin ( int  cabinsPerAxis,
int  maxPopulation 
)

Allow just a maximum number of DOM extrema in one cabin.

Set the cabin-optimization parameters

Parameters
cabinsPerAxisThe number of cabins per axis, i.e. the square root of the overall number of cabins
maxPopulationthe maximum number of DOM extrema in one cabin

Definition at line 87 of file BlobDetectorDOM.cpp.

template<class StorageType>
void BIAS::BlobDetectorBase< StorageType >::SetMaxNumBlobs ( const int  maxnum)
inlineinherited

Definition at line 74 of file BlobDetectorBase.hh.

template<class StorageType >
void BlobDetectorDOM::SetMaxSize ( unsigned int  maxSize)

Set maximum size of blobs.

Parameters
maxsizeMaximum size in pixel

Definition at line 99 of file BlobDetectorDOM.cpp.

template<class StorageType >
void BlobDetectorDOM::SetMinSize ( unsigned int  minSize)

Set minimum size of blobs.

Parameters
minsizeMinimum size in pixel

Definition at line 93 of file BlobDetectorDOM.cpp.

template<class StorageType >
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

Parameters
minSeedSizeSize of the smallest blob seeds
maxSeedSizeSize of the largest blob seeds
seedStepSizeStep size to get from minSeedSize to maxSeedSize

Definition at line 105 of file BlobDetectorDOM.cpp.

template<class StorageType >
void BlobDetectorDOM::SetThreshold ( float  threshold)

Set threshold for blob detection.

Parameters
thresholdDifference threshold between background and blob content

Definition at line 82 of file BlobDetectorDOM.cpp.

Member Data Documentation

template<class StorageType>
std::vector<float> BIAS::BlobDetectorDOM< StorageType >::blobQualityVec_
protected

Definition at line 136 of file BlobDetectorDOM.hh.

template<class StorageType>
float BIAS::BlobDetectorDOM< StorageType >::diffThreshold_
protected

Definition at line 126 of file BlobDetectorDOM.hh.

template<class StorageType>
int BIAS::BlobDetectorBase< StorageType >::dMaxNumBlobs_
protectedinherited

maximum number of corners to return

Definition at line 89 of file BlobDetectorBase.hh.

template<class StorageType>
std::vector<HomgPoint2D> BIAS::BlobDetectorDOM< StorageType >::generatedBlobs_
protected

Definition at line 135 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::height_
protected

Definition at line 148 of file BlobDetectorDOM.hh.

template<class StorageType>
double* BIAS::BlobDetectorDOM< StorageType >::intImg_
protected

Definition at line 146 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::maxBlobSize_
protected

Definition at line 128 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::maximumBinPopulation_
protected

Definition at line 133 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::maxSeedSize_
protected

Definition at line 130 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::minBlobSize_
protected

Definition at line 127 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::minSeedSize_
protected

Definition at line 129 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::numberOfBins_
protected

Definition at line 132 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::seedSizeStep_
protected

Definition at line 131 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::similarityThreshold_
protected

Definition at line 134 of file BlobDetectorDOM.hh.

template<class StorageType>
unsigned int BIAS::BlobDetectorDOM< StorageType >::width_
protected

Definition at line 147 of file BlobDetectorDOM.hh.


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