PCL
pcl::MultiscaleMedianTransform Class Reference

Multiscale median transform / hybrid median-wavelet transform. More...

#include <MultiscaleMedianTransform.h>

+ Inheritance diagram for pcl::MultiscaleMedianTransform:

Public Types

using layer = RedundantMultiscaleTransform::layer
 
using layer_state_set = RedundantMultiscaleTransform::layer_state_set
 
using transform = RedundantMultiscaleTransform::transform
 
- Public Types inherited from pcl::RedundantMultiscaleTransform
using layer = Image
 
using layer_state_set = GenericVector< bool >
 
using transform = Array< layer >
 

Public Member Functions

 MultiscaleMedianTransform (const MultiscaleMedianTransform &)=default
 
 MultiscaleMedianTransform (int n=4, int d=0)
 
 MultiscaleMedianTransform (MultiscaleMedianTransform &&)=default
 
 ~MultiscaleMedianTransform () override
 
void DisableMultiwayStructures (bool disable=true)
 
void EnableMultiwayStructures (bool enable=true)
 
bool IsMedianWaveletTransform () const
 
float MedianWaveletThreshold () const
 
MultiscaleMedianTransformoperator= (const MultiscaleMedianTransform &)=default
 
MultiscaleMedianTransformoperator= (MultiscaleMedianTransform &&)=default
 
void SetMedianWaveletThreshold (float threshold)
 
void SetMedianWaveletTransform (float threshold=5)
 
void SetMultiscaleMedianTransform ()
 
bool UsingMultiwayStructures () const
 
- Public Member Functions inherited from pcl::RedundantMultiscaleTransform
 RedundantMultiscaleTransform (const RedundantMultiscaleTransform &x)
 
 RedundantMultiscaleTransform (int n=4, int d=0)
 
 RedundantMultiscaleTransform (RedundantMultiscaleTransform &&)=default
 
 ~RedundantMultiscaleTransform () override
 
void BiasLayer (int i, float k)
 
void DeleteLayer (int i)
 
void DisableLayer (int i, bool disable=true)
 
void EnableLayer (int i, bool enable=true)
 
int FilterSize (int j) const
 
bool IsLayer (int i) const
 
bool IsLayerEnabled (int i) const
 
layerLayer (int i)
 
const layerLayer (int i) const
 
int NumberOfLayers () const
 
RedundantMultiscaleTransformoperator= (const RedundantMultiscaleTransform &x)
 
RedundantMultiscaleTransformoperator= (RedundantMultiscaleTransform &&)=default
 
layeroperator[] (int i)
 
const layeroperator[] (int i) const
 
virtual transform ReleaseTransform ()
 
virtual void Reset ()
 
int ScalingSequence () const
 
void SetDyadicScalingSequence ()
 
void SetLinearScalingSequence (int d=1)
 
void SetNumberOfLayers (int n)
 
void SetScalingSequence (int d)
 
- Public Member Functions inherited from pcl::BidirectionalImageTransformation
 BidirectionalImageTransformation ()=default
 
 BidirectionalImageTransformation (const BidirectionalImageTransformation &)=default
 
 ~BidirectionalImageTransformation () override
 
template<class P >
const GenericImage< P > & operator<< (const GenericImage< P > &image)
 
const ImageVariantoperator<< (const ImageVariant &image)
 
- Public Member Functions inherited from pcl::ImageTransformation
 ImageTransformation ()=default
 
 ImageTransformation (const ImageTransformation &)=default
 
virtual ~ImageTransformation ()
 
template<class P >
GenericImage< P > & operator>> (GenericImage< P > &image) const
 
ImageVariantoperator>> (ImageVariant &image) const
 
- Public Member Functions inherited from pcl::ParallelProcess
 ParallelProcess ()=default
 
 ParallelProcess (const ParallelProcess &)=default
 
virtual ~ParallelProcess ()
 
void DisableParallelProcessing (bool disable=true) noexcept
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept
 
bool IsParallelProcessingEnabled () const noexcept
 
int MaxProcessors () const noexcept
 
ParallelProcessoperator= (const ParallelProcess &)=default
 
void SetMaxProcessors (int maxProcessors) noexcept
 
void Swap (ParallelProcess &process) noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::RedundantMultiscaleTransform
void Apply (pcl::ComplexImage &) const override
 
void Apply (pcl::DComplexImage &) const override
 
void Apply (pcl::DImage &) const override
 
void Apply (pcl::Image &) const override
 
void Apply (pcl::UInt16Image &) const override
 
void Apply (pcl::UInt32Image &) const override
 
void Apply (pcl::UInt8Image &) const override
 

Detailed Description

The multiscale median transform algorithm produces a set {w1,w2,...,wN,cN}, where each wj is a set of coefficients at scale j, which we call detail layer, and cN is a large-scale smoothed residual, which we call residual layer. Each layer has the same dimensions as the input image, hence the generated multiscale transform is redundant.

The algorithm applies successive median filters with a structuring element of increasing size 2*s + 1, where s grows following a monotonically increasing sequence (the dyadic sequence 1, 2, 4, ... is used by default). Multiscale coefficients are the differences between each pair of successive median filtered images.

The hybrid median-wavelet transform merges the multiscale median and wavelet transforms in a single high-level operation. Wavelets are used to represent nonsignificant structures, such as noise and smooth regions, while median filtering is used to represent strong significant structures. This hybrid transform provides an optimal representation of the image by combining the strongest points of both techniques: wavelets are good to support smooth structures with weak variations, while the median transform is better at isolating significant, high-contrast structures.

The reconstruction algorithm consists of the sum of all wj multiscale layers for 1 <= j <= N, plus the residual layer cN.

References

  • Starck, J.-L., Murtagh, F. and J. Fadili, A. (2010), Sparse Image and Signal Processing: Wavelets, Curvelets, Morphological Diversity, Cambridge University Press.
  • Barth, Timothy J., Chan, Tony, Haimes, Robert (Eds.) (2002), Multiscale and Multiresolution Methods: Theory and Applications, Springer. invited paper: Jean-Luc Starck, Nonlinear Multiscale Transforms, pp. 239-279.

In our implementation, each layer in a multiscale median transform is a floating-point image with the same dimensions as the transformed image. Layers are indexed from 0 to N. Layers at indexes from 0 to N-1 are detail layers, whose elements are actually median difference coefficients. Pixels in a multiscale layer can be negative, zero or positive real values.

The last layer, at index N, is the large-scale residual layer. Pixels in the residual layer image can only be positive or zero real values.

The original algorithm uses square structuring elements. Square structures lead to relatively simple and efficient implementations, but unfortunately they tend to generate objectionable artifacts around round shapes. In our implementation we use special multiway structures to minimize these artifacts and to improve the behavior of the algorithm to isolate isotropic image structures.

Definition at line 124 of file MultiscaleMedianTransform.h.

Member Typedef Documentation

◆ layer

Represents a multiscale transform layer.

Definition at line 131 of file MultiscaleMedianTransform.h.

◆ layer_state_set

Represents a set of layer enabled/disabled states.

Definition at line 141 of file MultiscaleMedianTransform.h.

◆ transform

Represents a set of multiscale transform layers, or multiscale transform.

Definition at line 136 of file MultiscaleMedianTransform.h.

Constructor & Destructor Documentation

◆ MultiscaleMedianTransform() [1/3]

pcl::MultiscaleMedianTransform::MultiscaleMedianTransform ( int  n = 4,
int  d = 0 
)
inline

Constructs a MultiscaleMedianTransform instance.

Parameters
nNumber of detail layers. The transform will consist of n detail layers plus a residual layer, that is n+1 total layers. The default value is 4.
dScaling sequence. If d <= 0, the transform will use the dyadic sequence: 1, 2, 4, ... 2^i. If d > 0, its value is the distance in pixels between two successive scales.

The default values for n and d are 4 and 0, respectively (four layers and the dyadic scaling sequence).

Successive layers are computed by applying median filters with structuring elements of size 2*s + 1. The scaling sequence parameter d is interpreted as follows:

  • If the specified sequence parameter d is zero 0, then the transform uses the dyadic sequence: s = 1, 2, 4, ..., 2^j for 0 <= j < n.
  • If d > 0, then d is the constant increment in pixels between two successive scales (linear scaling sequence): s = d*j for 1 <= j < n.

Definition at line 167 of file MultiscaleMedianTransform.h.

◆ MultiscaleMedianTransform() [2/3]

pcl::MultiscaleMedianTransform::MultiscaleMedianTransform ( const MultiscaleMedianTransform )
default

Copy constructor.

◆ MultiscaleMedianTransform() [3/3]

pcl::MultiscaleMedianTransform::MultiscaleMedianTransform ( MultiscaleMedianTransform &&  )
default

Move constructor.

◆ ~MultiscaleMedianTransform()

pcl::MultiscaleMedianTransform::~MultiscaleMedianTransform ( )
inlineoverride

Destroys a MultiscaleMedianTransform object. All existing transform layers are destroyed and deallocated.

Definition at line 186 of file MultiscaleMedianTransform.h.

Member Function Documentation

◆ DisableMultiwayStructures()

void pcl::MultiscaleMedianTransform::DisableMultiwayStructures ( bool  disable = true)
inline

Disables the use of multiway structuring elements. See UsingMultiwayStructures() for more information.

Note
Calling this member function implicitly deletes all existing transform layers.

Definition at line 231 of file MultiscaleMedianTransform.h.

◆ EnableMultiwayStructures()

void pcl::MultiscaleMedianTransform::EnableMultiwayStructures ( bool  enable = true)
inline

Enables the use of multiway structuring elements. See UsingMultiwayStructures() for more information.

Note
Calling this member function implicitly deletes all existing transform layers.

Definition at line 218 of file MultiscaleMedianTransform.h.

◆ IsMedianWaveletTransform()

bool pcl::MultiscaleMedianTransform::IsMedianWaveletTransform ( ) const
inline

Returns true iff this object performs a hybrid median-wavelet transform. Returns false if this is a pure multiscale median transform.

Definition at line 240 of file MultiscaleMedianTransform.h.

◆ MedianWaveletThreshold()

float pcl::MultiscaleMedianTransform::MedianWaveletThreshold ( ) const
inline

Returns the current median-wavelet threshold in sigma units. See the documentation for SetMedianWaveletThreshold() for more information.

Definition at line 289 of file MultiscaleMedianTransform.h.

◆ operator=() [1/2]

MultiscaleMedianTransform& pcl::MultiscaleMedianTransform::operator= ( const MultiscaleMedianTransform )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

MultiscaleMedianTransform& pcl::MultiscaleMedianTransform::operator= ( MultiscaleMedianTransform &&  )
default

Move assignment operator. Returns a reference to this object.

◆ SetMedianWaveletThreshold()

void pcl::MultiscaleMedianTransform::SetMedianWaveletThreshold ( float  threshold)
inline

Sets a threshold in sigma units for per-layer suppression of significant median transform coefficients. Image structures represented by median coefficients with absolute values smaller than this threshold will be supported by wavelet transform coefficients. The larger this value, the more image structures will be supported by wavelet coefficients.

By default the median-wavelet threshold is 5 sigma. This is normally large enough to prevent inclusion of the noise in median transform coefficients.

Note
Calling this member function implicitly deletes all existing transform layers.

Definition at line 279 of file MultiscaleMedianTransform.h.

References pcl::Max().

◆ SetMedianWaveletTransform()

void pcl::MultiscaleMedianTransform::SetMedianWaveletTransform ( float  threshold = 5)
inline

Causes this object to perform a hybrid wavelet-median transform.

Parameters
thresholdThreshold in sigma units for per-layer suppression of significant median transform coefficients. Image structures represented by median coefficients with absolute values smaller than this threshold will be supported by wavelet transform coefficients. The default value is 5 sigma.
Note
Calling this member function implicitly deletes all existing transform layers.

Definition at line 258 of file MultiscaleMedianTransform.h.

References pcl::Max().

◆ SetMultiscaleMedianTransform()

void pcl::MultiscaleMedianTransform::SetMultiscaleMedianTransform ( )
inline

Causes this object to perform a pure multiscale median transform.

Note
Calling this member function implicitly deletes all existing transform layers.

Definition at line 300 of file MultiscaleMedianTransform.h.

◆ UsingMultiwayStructures()

bool pcl::MultiscaleMedianTransform::UsingMultiwayStructures ( ) const
inline

Returns true if this transform applies special multiway structuring elements for improved isotropic behavior. Returns false if simple structures are used instead for improved execution speed, at the cost of some performance degradation in the isotropic behavior of the transform.

Definition at line 206 of file MultiscaleMedianTransform.h.


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