Basic Image AlgorithmS Library
2.8.0
|
Dilation operator for binary images (black and white) More...
#include <Filter/Dilation.hh>
Public Types | |
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid } |
enum for border calculation, same meanings as in matlab: More... | |
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
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. More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
int | Dilate (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3) |
dilate with square kernel filled with 255 More... | |
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. More... | |
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. More... | |
Dilation () | |
Dilation (const Dilation< InputStorageType, OutputStorageType > &other) | |
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 More... | |
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
Does the dilation. More... | |
int | GetBorderHandling () const |
void | GetBorders (int &border_x, int &border_y) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
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 | SetBorderHandling (const int bh) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
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. More... | |
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) More... | |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
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 More... | |
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 More... | |
std::map< std::string, long int > | _String2Debuglevel |
bool | DilateLower_ |
int | kernelSize_ |
Very fast deletion of pixels with no neighbours. More... | |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Dilation operator for binary images (black and white)
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.
|
inherited |
enum for border calculation, same meanings as in matlab:
Enumerator | |
---|---|
TBH_full | |
TBH_same | |
TBH_valid |
Definition at line 98 of file FilterBase.hh.
|
inline |
Definition at line 46 of file Dilation.hh.
Dilation::Dilation | ( | const Dilation< InputStorageType, OutputStorageType > & | other | ) |
Definition at line 37 of file Dilation.cpp.
|
inlinevirtual |
Definition at line 48 of file Dilation.hh.
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
|
inlineprotectedinherited |
|
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.
Definition at line 135 of file FilterBase.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
int Dilation::Dilate | ( | const Image< InputStorageType > & | Source, |
Image< OutputStorageType > & | Destination, | ||
int | KernelSize = 3 |
||
) |
dilate with square kernel filled with 255
Definition at line 44 of file Dilation.cpp.
References 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().
int Dilation::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.
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 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().
int Dilation::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.
src and dest must NOT be the same!
Definition at line 199 of file Dilation.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().
|
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().
|
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::ImageBase::Cut2ROI(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ROI::SetCorners().
Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), and BIAS::PMDImageProc::FitDepthTo2DImageFree_().
|
inlineinherited |
Definition at line 129 of file FilterBase.hh.
|
inherited |
Definition at line 61 of file FilterBase.cpp.
Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::GetBordersValid_().
|
protectedvirtual |
Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.
Definition at line 325 of file Dilation.cpp.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 127 of file FilterBase.hh.
Referenced by BIAS::PMDImageProc::DenoiseDepthImage(), BIAS::CalibratedPyramid< StorageType >::Downsample_(), BIAS::PMDImageProc::FitDepthTo2DImage(), and BIAS::PMDImageProc::FitDepthTo2DImageFree_().
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlinestaticinherited |
|
inlineinherited |
Definition at line 56 of file Morphology.hh.
Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), and BIAS::PMDImageProc::FitDepthTo2DImageFree_().
|
inherited |
run over all pixel which do not belong to the roi and set them to some value (typically black)
Definition at line 84 of file FilterBase.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.
|
inlineinherited |
|
protectedinherited |
Definition at line 132 of file FilterBase.hh.
Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 101 of file Dilation.hh.
|
staticprotectedinherited |
|
protectedinherited |
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.