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

detects regions with close to zero gradients in images, works on color images only More...

#include <FeatureDetector/ConstantRegionDetector.hh>

+ Inheritance diagram for BIAS::ConstantRegionDetector< StorageType, CalculationType >:
+ Collaboration diagram for BIAS::ConstantRegionDetector< StorageType, CalculationType >:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
 ConstantRegionDetector ()
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
virtual int Detect (Image< StorageType > &src, std::vector< HomgPoint2D > &points2d, std::vector< Vector3< StorageType > > &colors, bool useMedian=false)
 Detects constant regions in image src. More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int GetHalfWinSize ()
 
int GetMaxNumFeatures ()
 
CalculationType GetThreshold ()
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetHalfWinSize (int halfWinSize)
 
void SetMaskImage (BIAS::Image< unsigned char > &maskImg)
 
void SetMaxNumFeatures (int maxNumFeatures)
 restrict maximum number of features -1 is default and all features are returned. More...
 
void SetMinDistance (int minDistance)
 
void SetThreshold (CalculationType threshold)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
virtual ~ConstantRegionDetector ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
std::vector< ColFeat
< StorageType > > 
featureList_
 
int halfWinSize_
 
BIAS::Image< unsigned char > maskImg_
 mask image usefull for water regions in images which usually have very constant regions compared to the rest of the image (set to one if water/ to to be used) More...
 
int maxNumFeatures_
 restrict maximum number of features -1 is default and all features are returned. More...
 
int minDistance_
 required min distance between two constance regions More...
 
CalculationType threshold_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::ConstantRegionDetector< StorageType, CalculationType >

detects regions with close to zero gradients in images, works on color images only

Author
sedlazeck 12/2008
Examples:
ExampleConstantRegion.cpp.

Definition at line 66 of file ConstantRegionDetector.hh.

Constructor & Destructor Documentation

template<class StorageType , class CalculationType >
ConstantRegionDetector::ConstantRegionDetector ( )

Definition at line 40 of file ConstantRegionDetector.cpp.

template<class StorageType , class CalculationType >
ConstantRegionDetector::~ConstantRegionDetector ( )
virtual

Definition at line 49 of file ConstantRegionDetector.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

template<class StorageType , class CalculationType >
int ConstantRegionDetector::Detect ( Image< StorageType > &  src,
std::vector< HomgPoint2D > &  points2d,
std::vector< Vector3< StorageType > > &  colors,
bool  useMedian = false 
)
virtual

Detects constant regions in image src.

Constant regions around pixels in images are detected by a histogram-based method, that is applied to windows around the pixel in question. The differences in color are compared. threshold is the allowed average deviation from the color of the middle pixel. halfWinSize the size of the window used for detection. if useMedian is set to true, the input image will be filtered by a median filter first. The result is written into a vector with homogenuous 2D points and a segmentation image.

Author
sedlazeck 01/2009
Todo:
optimize for ROI usage

Definition at line 53 of file ConstantRegionDetector.cpp.

References BIAS::ColFeat< StorageType >::col, BIAS::Median< InputStorageType, OutputStorageType >::FilterColorImg(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Median< InputStorageType, OutputStorageType >::SetSize(), BIAS::ColFeat< StorageType >::val, BIAS::ColFeat< StorageType >::x, and BIAS::ColFeat< StorageType >::y.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

template<class StorageType, class CalculationType>
int BIAS::ConstantRegionDetector< StorageType, CalculationType >::GetHalfWinSize ( )
inline

Definition at line 82 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
int BIAS::ConstantRegionDetector< StorageType, CalculationType >::GetMaxNumFeatures ( )
inline

Definition at line 101 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
CalculationType BIAS::ConstantRegionDetector< StorageType, CalculationType >::GetThreshold ( )
inline

Definition at line 75 of file ConstantRegionDetector.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

template<class StorageType, class CalculationType>
void BIAS::ConstantRegionDetector< StorageType, CalculationType >::SetHalfWinSize ( int  halfWinSize)
inline

Definition at line 79 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
void BIAS::ConstantRegionDetector< StorageType, CalculationType >::SetMaskImage ( BIAS::Image< unsigned char > &  maskImg)
inline

Definition at line 86 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
void BIAS::ConstantRegionDetector< StorageType, CalculationType >::SetMaxNumFeatures ( int  maxNumFeatures)
inline

restrict maximum number of features -1 is default and all features are returned.

Definition at line 97 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
void BIAS::ConstantRegionDetector< StorageType, CalculationType >::SetMinDistance ( int  minDistance)
inline

Definition at line 90 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
void BIAS::ConstantRegionDetector< StorageType, CalculationType >::SetThreshold ( CalculationType  threshold)
inline

Definition at line 72 of file ConstantRegionDetector.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

template<class StorageType, class CalculationType>
std::vector<ColFeat<StorageType> > BIAS::ConstantRegionDetector< StorageType, CalculationType >::featureList_
protected

Definition at line 123 of file ConstantRegionDetector.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

template<class StorageType, class CalculationType>
int BIAS::ConstantRegionDetector< StorageType, CalculationType >::halfWinSize_
protected

Definition at line 122 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
BIAS::Image<unsigned char> BIAS::ConstantRegionDetector< StorageType, CalculationType >::maskImg_
protected

mask image usefull for water regions in images which usually have very constant regions compared to the rest of the image (set to one if water/ to to be used)

Definition at line 130 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
int BIAS::ConstantRegionDetector< StorageType, CalculationType >::maxNumFeatures_
protected

restrict maximum number of features -1 is default and all features are returned.

Definition at line 125 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
int BIAS::ConstantRegionDetector< StorageType, CalculationType >::minDistance_
protected

required min distance between two constance regions

Definition at line 127 of file ConstantRegionDetector.hh.

template<class StorageType, class CalculationType>
CalculationType BIAS::ConstantRegionDetector< StorageType, CalculationType >::threshold_
protected

Definition at line 121 of file ConstantRegionDetector.hh.


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