Basic Image AlgorithmS Library
2.8.0
|
2D bilateral filter More...
#include <Filter/Bilateral.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) |
Bilateral () | |
Bilateral (const Bilateral< InputStorageType, OutputStorageType > &other) | |
virtual FilterNToN < InputStorageType, OutputStorageType > * | Clone () const |
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 |
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
Bilateral filtering with given filter size (5x5 as standard) More... | |
virtual int | Filter (const Image< InputStorageType > &src, const Image< InputStorageType > &support, Image< OutputStorageType > &dst) |
Bilateral filtering with given filter size (5x5 as standard) uses support image as smoothing restriction, see Petschnigg 2004: DigitalPhotography. More... | |
int | FilterColorImg (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
Filter a color image by calling Filter(...) for every channel. More... | |
int | FilterColorImg (const Image< InputStorageType > &src, const Image< InputStorageType > &support, Image< OutputStorageType > &dst) |
Filter a color image with support image by calling Filter(...) for every channel. More... | |
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
double | GetBilateralSigma () const |
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 |
InputStorageType | GetIgnoreValue () |
double | GetSigma () 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 | SetBilateralSigma (const double si) |
void | SetBorderHandling (const int bh) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetIgnoreValue (InputStorageType ignore) |
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 | SetSigma (const double si) |
void | SetSize (int newsize, int secondsize=-1) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
virtual | ~Bilateral () |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
void | _CalculateKernels (double gaussSigma) |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
virtual void | GetBordersValid_ (int &border_x, int &border_y) const |
Protected Attributes | |
double | _BilateralSigma |
int | _BilateralSize |
half win size of filter, 1 means 3x3 More... | |
int | _FilterBorderHandling |
BIAS::Image< float > | _gaussFilterMask |
double | _GaussSigma |
sigma of gaussian kernel More... | |
InputStorageType | _ignoreValue |
int | _lastBilateralSize |
int | _lastSecondSize |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
int | _secondSize |
Use this variable for non-quadratic filter sizes e.g. 3x1. More... | |
std::map< std::string, long int > | _String2Debuglevel |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
2D bilateral filter
Definition at line 35 of file Bilateral.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.
Bilateral::Bilateral | ( | ) |
Definition at line 36 of file Bilateral.cpp.
References BIAS::Bilateral< InputStorageType, OutputStorageType >::_BilateralSigma, BIAS::Bilateral< InputStorageType, OutputStorageType >::_BilateralSize, BIAS::Bilateral< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Bilateral< InputStorageType, OutputStorageType >::_ignoreValue, BIAS::Bilateral< InputStorageType, OutputStorageType >::_lastBilateralSize, BIAS::Bilateral< InputStorageType, OutputStorageType >::_lastSecondSize, BIAS::Bilateral< InputStorageType, OutputStorageType >::_secondSize, and BIAS::Bilateral< InputStorageType, OutputStorageType >::SetSize().
Bilateral::Bilateral | ( | const Bilateral< InputStorageType, OutputStorageType > & | other | ) |
Definition at line 51 of file Bilateral.cpp.
|
virtual |
Definition at line 67 of file Bilateral.cpp.
|
protected |
Definition at line 91 of file Bilateral.cpp.
|
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 |
|
inlinevirtual |
Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.
Definition at line 63 of file Bilateral.hh.
|
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 |
|
virtual |
Bilateral filtering with given filter size (5x5 as standard)
Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.
Definition at line 115 of file Bilateral.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::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ImageBase::StealImage().
|
virtual |
Bilateral filtering with given filter size (5x5 as standard) uses support image as smoothing restriction, see Petschnigg 2004: DigitalPhotography.
Definition at line 203 of file Bilateral.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::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ImageBase::StealImage().
int Bilateral::FilterColorImg | ( | const Image< InputStorageType > & | src, |
Image< OutputStorageType > & | dst | ||
) |
Filter a color image by calling Filter(...) for every channel.
use planar image in order to apply median filter seperately to each channel for now
Definition at line 320 of file Bilateral.cpp.
References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and BIAS::ImageBase::SetChannel().
int Bilateral::FilterColorImg | ( | const Image< InputStorageType > & | src, |
const Image< InputStorageType > & | support, | ||
Image< OutputStorageType > & | dst | ||
) |
Filter a color image with support image by calling Filter(...) for every channel.
use planar image in order to apply median filter seperately to each channel for now
Definition at line 363 of file Bilateral.cpp.
References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and BIAS::ImageBase::SetChannel().
|
virtual |
Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.
Definition at line 300 of file Bilateral.cpp.
|
virtual |
Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.
Definition at line 290 of file Bilateral.cpp.
|
inline |
Definition at line 86 of file Bilateral.hh.
|
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 309 of file Bilateral.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 |
|
inline |
Definition at line 88 of file Bilateral.hh.
|
inline |
Definition at line 84 of file Bilateral.hh.
|
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 |
|
inline |
Definition at line 85 of file Bilateral.hh.
|
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 |
|
inlinestaticinherited |
|
inline |
Definition at line 87 of file Bilateral.hh.
|
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.
|
inline |
Definition at line 83 of file Bilateral.hh.
void Bilateral::SetSize | ( | int | newsize, |
int | secondsize = -1 |
||
) |
Definition at line 72 of file Bilateral.cpp.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
inlineinherited |
|
protected |
Definition at line 95 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
protected |
half win size of filter, 1 means 3x3
Definition at line 97 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
protectedinherited |
Definition at line 132 of file FilterBase.hh.
Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase().
|
protected |
Definition at line 101 of file Bilateral.hh.
|
protected |
sigma of gaussian kernel
Definition at line 95 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
protected |
Definition at line 103 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
protected |
Definition at line 97 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
protected |
Definition at line 99 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
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=().
|
protected |
Use this variable for non-quadratic filter sizes e.g. 3x1.
Definition at line 99 of file Bilateral.hh.
Referenced by BIAS::Bilateral< InputStorageType, OutputStorageType >::Bilateral().
|
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=().
|
staticprotectedinherited |