#include <Filter/Dilation.hh>


Public Types | |
| enum | TBorderHandling { TBH_full, TBH_same, TBH_valid } |
enum for border calculation, same meanings as in matlab:
| |
Public Member Functions | |
| void | AddDebugLevel (const std::string &name) |
| void | AddDebugLevel (const long int lv) |
| bool | DebugLevelIsSet (const std::string &name) const |
| bool | DebugLevelIsSet (const long int lv) const |
| int | Dilate (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3) |
| dilate with square kernel filled with 255 | |
| int | Dilate3Fast (const Image< InputStorageType > &src, Image< OutputStorageType > &dest, bool Neighbor4=false) |
| Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground. | |
| int | Dilate3Fast (const Image< InputStorageType > &src, const Image< InputStorageType > &orig, Image< OutputStorageType > &dest, bool Neighbor4=false) |
| Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground. | |
| Dilation (const Dilation< InputStorageType, OutputStorageType > &other) | |
| Dilation () | |
| 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) |
| Does the dilation. | |
| 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 |
| 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 | SetDilateLower (bool dl) |
| If DilateLower=true then the lower value (except 0) overwrites the higher otherwise the standard algorithm (higher value overrides lower) is done. | |
| void | SetKernelSize (int size) |
| void | ShowDebugLevel (std::ostream &os=std::cout) const |
| prints all internally known debuglevels | |
| virtual | ~Dilation () |
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 |
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 |
| bool | DilateLower_ |
| int | kernelSize_ |
| Very fast deletion of pixels with no neighbours. | |
Static Protected Attributes | |
| static std::ostream | _zDebugStream |
| static long int | GlobalDebugLevel = 0 |
Dilation sets all pixel to 255, which have a neighboring pixel !=0 It is also possible to dilate the image with a real grey-value image with Dilate3Fast(). Fastest ist TBH_valid and kernelsize=3 or call Dilate3Fast() directly.
Definition at line 43 of file Dilation.hh.
enum BIAS::FilterBase::TBorderHandling [inherited] |
enum for border calculation, same meanings as in matlab:
The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.
Definition at line 96 of file FilterBase.hh.
| BIAS::Dilation< InputStorageType, OutputStorageType >::Dilation | ( | ) | [inline] |
Definition at line 46 of file Dilation.hh.
| Dilation::Dilation | ( | const Dilation< InputStorageType, OutputStorageType > & | other | ) | [inline] |
Definition at line 37 of file Dilation.cpp.
References BIAS::Dilation< InputStorageType, OutputStorageType >::DilateLower_.
| virtual BIAS::Dilation< InputStorageType, OutputStorageType >::~Dilation | ( | ) | [inline, virtual] |
Definition at line 48 of file Dilation.hh.
| void BIAS::Debug::AddDebugLevel | ( | const std::string & | name | ) | [inline, inherited] |
| void BIAS::Debug::AddDebugLevel | ( | const long int | lv | ) | [inline, inherited] |
Definition at line 347 of file Debug.hh.
Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), main(), BIAS::PMDImageProc::PreparePolyDepthCalibration(), and BIAS::RANSAC< SolutionType >::RANSAC().
| long BIAS::Debug::ConsumeNextFreeDebuglevel_ | ( | ) | [inline, protected, inherited] |
| bool BIAS::Debug::DebugLevelIsSet | ( | const std::string & | name | ) | const [inline, inherited] |
| 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().
| int Dilation::Dilate | ( | const Image< InputStorageType > & | Source, | |
| Image< OutputStorageType > & | Destination, | |||
| int | KernelSize = 3 | |||
| ) | [inline] |
dilate with square kernel filled with 255
Definition at line 44 of file Dilation.cpp.
References BIASERR, BIAS::Dilation< InputStorageType, OutputStorageType >::DilateLower_, BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::RedirectImageDataPointer(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().
Referenced by BIAS::Dilation< InputStorageType, OutputStorageType >::Filter().
| int Dilation::Dilate3Fast | ( | const Image< InputStorageType > & | src, | |
| Image< OutputStorageType > & | dest, | |||
| bool | Neighbor4 = false | |||
| ) | [inline] |
Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.
src and dest must NOT be the same!
Definition at line 199 of file Dilation.cpp.
References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().
| int Dilation::Dilate3Fast | ( | const Image< InputStorageType > & | src, | |
| const Image< InputStorageType > & | orig, | |||
| Image< OutputStorageType > & | dest, | |||
| bool | Neighbor4 = false | |||
| ) | [inline] |
Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.
The src img is dilated with pixels from orig. Therefore src and orig MUST NOT be the same, set orig to a 255 image if u have no original grey image. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!
Definition at line 109 of file Dilation.cpp.
References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), and BIAS::ImageBase::GetWidth().
Referenced by BIAS::Dilation< InputStorageType, OutputStorageType >::Filter().
| int Morphology::FillBorderConst | ( | Image< OutputStorageType > & | Image, | |
| unsigned short int | XBorderSize, | |||
| unsigned short int | YBorderSize, | |||
| OutputStorageType | Value | |||
| ) | [inline, inherited] |
fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis
Definition at line 53 of file Morphology.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().
Referenced by BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), and BIAS::Erosion< InputStorageType, OutputStorageType >::Erode().
| int Dilation::Filter | ( | const Image< InputStorageType > & | src, | |
| Image< OutputStorageType > & | dst | |||
| ) | [inline, virtual] |
Does the dilation.
ROI ignored, but set if TBH_valid
Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.
Definition at line 282 of file Dilation.cpp.
References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, BIASERR, BIAS::ImageBase::Cut2ROI(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_, BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.
Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::PMDImageProc::FitDepthTo2DImageFree_(), and main().
| int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling | ( | ) | const [inline, inherited] |
Definition at line 112 of file FilterBase.hh.
Referenced by BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), and BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt().
| void FilterBase::GetBorders | ( | int & | border_x, | |
| int & | border_y | |||
| ) | const [inline, inherited] |
Definition at line 61 of file FilterBase.cpp.
References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.
| void Dilation::GetBordersValid_ | ( | int & | border_x, | |
| int & | border_y | |||
| ) | const [inline, protected, virtual] |
Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.
Definition at line 325 of file Dilation.cpp.
| int BIAS::Debug::GetDebugLevel | ( | ) | const [inline, inherited] |
Definition at line 324 of file Debug.hh.
Referenced by BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::ImageAlignment::Align(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::TrackerBaseAffine2< StorageType >::TrackAffine_(), and BIAS::TrackerBaseAffine< StorageType >::TrackAffine_().
| void BIAS::Debug::GetDebugStream | ( | std::ostream & | os | ) | const [inline, inherited] |
| std::ostream& BIAS::Debug::GetDebugStream | ( | ) | const [inline, inherited] |
Definition at line 397 of file Debug.hh.
Referenced by BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), and BIAS::GuiGTK::MouseMotionCallback_().
| static long int BIAS::Debug::GetGlobalDebugLevel | ( | ) | [inline, static, inherited] |
Definition at line 423 of file Debug.hh.
Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().
| long int BIAS::Debug::Name2DebugLevel | ( | const std::string & | name | ) | const [inline, inherited] |
| long int BIAS::Debug::NewDebugLevel | ( | const std::string & | name | ) | [inline, inherited] |
creates a new debuglevel
Definition at line 466 of file Debug.hh.
References ABORT, it, and res.
Referenced by BIAS::Condensation::Condensation(), BIAS::Histogram::Histogram(), BIAS::MonteCarloTransform::MonteCarloTransform(), myclass::myclass(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
| void BIAS::Debug::PrintDebugLevel | ( | std::ostream & | os = std::cout |
) | const [inline, inherited] |
| void BIAS::Debug::RemoveDebugLevel | ( | const std::string & | name | ) | [inline, inherited] |
| void BIAS::Debug::RemoveDebugLevel | ( | const long int | lv | ) | [inline, inherited] |
| void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling | ( | const int | bh | ) | [inline, inherited] |
Definition at line 110 of file FilterBase.hh.
Referenced by BIAS::PMDImageProc::DenoiseDepthImage(), BIAS::CalibratedPyramid< StorageType >::Downsample_(), BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::PMDImageProc::FitDepthTo2DImageFree_(), and main().
| void BIAS::Debug::SetDebugLevel | ( | const std::string & | name | ) | [inline, inherited] |
| void BIAS::Debug::SetDebugLevel | ( | const long int | lv | ) | [inline, inherited] |
Definition at line 310 of file Debug.hh.
Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
| void BIAS::Debug::SetDebugStream | ( | const std::ostream & | os | ) | [inline, inherited] |
| void BIAS::Dilation< InputStorageType, OutputStorageType >::SetDilateLower | ( | bool | dl | ) | [inline] |
If DilateLower=true then the lower value (except 0) overwrites the higher otherwise the standard algorithm (higher value overrides lower) is done.
@ author streckel 10/06
Definition at line 89 of file Dilation.hh.
| static void BIAS::Debug::SetGlobalDebugLevel | ( | long int | lev | ) | [inline, static, inherited] |
| void BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize | ( | int | size | ) | [inline, inherited] |
Definition at line 56 of file Morphology.hh.
Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::PMDImageProc::FitDepthTo2DImageFree_(), and main().
| void BIAS::Debug::ShowDebugLevel | ( | std::ostream & | os = std::cout |
) | const [inline, inherited] |
int BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited] |
Definition at line 115 of file FilterBase.hh.
Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().
long int BIAS::Debug::_liDebugLevel [protected, inherited] |
Definition at line 502 of file Debug.hh.
Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().
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] |
std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited] |
Definition at line 503 of file Debug.hh.
Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().
bool BIAS::Dilation< InputStorageType, OutputStorageType >::DilateLower_ [protected] |
Definition at line 101 of file Dilation.hh.
Referenced by BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), and BIAS::Dilation< InputStorageType, OutputStorageType >::Dilation().
long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited] |
int BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_ [protected, inherited] |
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!
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().
1.5.7.1