BIAS::Morphology< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

base class for Erosion, Dilation, and single Deletion More...

#include <Filter/Morphology.hh>

Inheritance diagram for BIAS::Morphology< InputStorageType, OutputStorageType >:

Inheritance graph
[legend]
Collaboration diagram for BIAS::Morphology< InputStorageType, OutputStorageType >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  TBorderHandling { TBH_full, TBH_same, TBH_valid }
 enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void AddDebugLevel (const std::string &name)
void AddDebugLevel (const long int lv)
void CopyNonROIFromSource (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) const
 run over all pixel which do not belong to the roi and set them to the value in the source image regardless of the roi of the source.
bool DebugLevelIsSet (const std::string &name) const
bool DebugLevelIsSet (const long int lv) const
int FillBorderConst (Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value)
 fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis
virtual int Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
 prototyp for filter computation function
int GetBorderHandling () const
void GetBorders (int &border_x, int &border_y) const
int GetDebugLevel () const
void GetDebugStream (std::ostream &os) const
std::ostream & GetDebugStream () const
 Morphology (const Morphology< InputStorageType, OutputStorageType > &other)
 Morphology ()
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
void PrintDebugLevel (std::ostream &os=std::cout) const
void RemoveDebugLevel (const std::string &name)
void RemoveDebugLevel (const long int lv)
void SetBorderHandling (const int bh)
void SetDebugLevel (const std::string &name)
void SetDebugLevel (const long int lv)
void SetDebugStream (const std::ostream &os)
void SetKernelSize (int size)
void SetNonROIToValue (Image< OutputStorageType > &dst, const std::vector< OutputStorageType > &t) const
 run over all pixel which do not belong to the roi and set them to some value (typically black)
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels
virtual ~Morphology ()

Static Public Member Functions

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

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel
virtual void GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int _FilterBorderHandling
long int _liDebugLevel
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class
std::map< std::string, long int > _String2Debuglevel
int kernelSize_
 Very fast deletion of pixels with no neighbours.

Static Protected Attributes

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


Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Morphology< InputStorageType, OutputStorageType >

base class for Erosion, Dilation, and single Deletion

Author:
grest, Oct. 2004

Definition at line 41 of file Morphology.hh.


Member Enumeration Documentation

template<class InputStorageType , class OutputStorageType >
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full 
TBH_same 
TBH_valid 

Definition at line 97 of file FilterBase.hh.


Constructor & Destructor Documentation

template<class InputStorageType , class OutputStorageType >
Morphology::Morphology (  )  [inline]

template<class InputStorageType , class OutputStorageType >
Morphology::Morphology ( const Morphology< InputStorageType, OutputStorageType > &  other  )  [inline]

Definition at line 42 of file Morphology.cpp.

template<class InputStorageType , class OutputStorageType >
Morphology::~Morphology (  )  [inline, virtual]

Definition at line 48 of file Morphology.cpp.


Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const std::string &  name  )  [inline, inherited]

Definition at line 354 of file Debug.hh.

void BIAS::Debug::AddDebugLevel ( const long int  lv  )  [inline, inherited]

long BIAS::Debug::ConsumeNextFreeDebuglevel_ (  )  [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 513 of file Debug.hh.

References ABORT.

template<class InputStorageType , class OutputStorageType >
void FilterBase::CopyNonROIFromSource ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
) const [inline, inherited]

run over all pixel which do not belong to the roi and set them to the value in the source image regardless of the roi of the source.

Both images must have same size.

Author:
koeser 12/2008

Definition at line 135 of file FilterBase.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.

bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name  )  const [inline, inherited]

Definition at line 342 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv  )  const [inline, inherited]

Definition at line 333 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::ImageBlender::BlendImages(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::GenSynthMatches::GetGTNormalizedF(), main(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), and BIAS::MonteCarloTransform::Transform().

template<class InputStorageType , class OutputStorageType >
int Morphology::FillBorderConst ( Image< OutputStorageType > &  Image,
unsigned short int  XBorderSize,
unsigned short int  YBorderSize,
OutputStorageType  Value 
) [inline]

template<class InputStorageType , class OutputStorageType >
virtual int BIAS::FilterBase< InputStorageType, OutputStorageType >::Filter ( const Image< InputStorageType > &  src,
Image< OutputStorageType > &  dst 
) [pure virtual, inherited]

prototyp for filter computation function

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::CannyEdge< InputStorageType, OutputStorageType >, BIAS::CensusTransform< InputStorageType, OutputStorageType >, BIAS::ColorFilter< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GaussThreshold< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Shift< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Thinning< InputStorageType, OutputStorageType >, BIAS::Convolution< OutputStorageType, OutputStorageType >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::FilterNToN< StorageType, CalculationType >, BIAS::Gauss< float, float >, BIAS::Gauss< OutputStorageType, OutputStorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Gauss< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, BIAS::Rescale< StorageType, StorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

template<class InputStorageType , class OutputStorageType >
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling (  )  const [inline, inherited]

template<class InputStorageType , class OutputStorageType >
void FilterBase::GetBorders ( int &  border_x,
int &  border_y 
) const [inline, inherited]

template<class InputStorageType , class OutputStorageType >
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ ( int &  border_x,
int &  border_y 
) const [protected, pure virtual, inherited]

int BIAS::Debug::GetDebugLevel (  )  const [inline, inherited]

void BIAS::Debug::GetDebugStream ( std::ostream &  os  )  const [inline, inherited]

Definition at line 406 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream (  )  const [inline, inherited]

static long int BIAS::Debug::GetGlobalDebugLevel (  )  [inline, static, inherited]

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name  )  const [inline, inherited]

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

Author:
woelk 09/2006

Definition at line 446 of file Debug.hh.

References it.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name  )  [inline, inherited]

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout  )  const [inline, inherited]

Definition at line 375 of file Debug.hh.

References WS.

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name  )  [inline, inherited]

Definition at line 368 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv  )  [inline, inherited]

Definition at line 361 of file Debug.hh.

template<class InputStorageType , class OutputStorageType >
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int  bh  )  [inline, inherited]

void BIAS::Debug::SetDebugLevel ( const std::string &  name  )  [inline, inherited]

Definition at line 317 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv  )  [inline, inherited]

void BIAS::Debug::SetDebugStream ( const std::ostream &  os  )  [inline, inherited]

Definition at line 390 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev  )  [inline, static, inherited]

Definition at line 416 of file Debug.hh.

Referenced by main().

template<class InputStorageType , class OutputStorageType >
void BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize ( int  size  )  [inline]

template<class InputStorageType , class OutputStorageType >
void FilterBase::SetNonROIToValue ( Image< OutputStorageType > &  dst,
const std::vector< OutputStorageType > &  t 
) const [inline, inherited]

run over all pixel which do not belong to the roi and set them to some value (typically black)

Author:
koeser 12/2008

Definition at line 84 of file FilterBase.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout  )  const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 488 of file Debug.hh.

References it.

Referenced by main().


Member Data Documentation

template<class InputStorageType , class OutputStorageType >
int BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

long int BIAS::Debug::_liDebugLevel [protected, inherited]

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 508 of file Debug.hh.

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

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 509 of file Debug.hh.

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

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 505 of file Debug.hh.

template<class InputStorageType , class OutputStorageType >
int BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_ [protected]

Very fast deletion of pixels with no neighbours.

All values, which are not zero, are treated as foreground. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!

Author:
Daniel Grest, Sept. 2002 tested pointer into param object, determines influence region size

Definition at line 71 of file Morphology.hh.

Referenced by BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), and BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology().


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

Generated on Tue Jan 6 01:12:05 2009 for Basic Image AlgorithmS Library by  doxygen 1.5.7.1