PCL
|
Multiscale median transform / hybrid median-wavelet transform. More...
#include <MultiscaleMedianTransform.h>
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 > |
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 |
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
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.
Represents a multiscale transform layer.
Definition at line 131 of file MultiscaleMedianTransform.h.
using pcl::MultiscaleMedianTransform::layer_state_set = RedundantMultiscaleTransform::layer_state_set |
Represents a set of layer enabled/disabled states.
Definition at line 141 of file MultiscaleMedianTransform.h.
Represents a set of multiscale transform layers, or multiscale transform.
Definition at line 136 of file MultiscaleMedianTransform.h.
|
inline |
Constructs a MultiscaleMedianTransform instance.
n | Number 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. |
d | Scaling 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:
Definition at line 167 of file MultiscaleMedianTransform.h.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlineoverride |
Destroys a MultiscaleMedianTransform object. All existing transform layers are destroyed and deallocated.
Definition at line 186 of file MultiscaleMedianTransform.h.
|
inline |
Disables the use of multiway structuring elements. See UsingMultiwayStructures() for more information.
Definition at line 231 of file MultiscaleMedianTransform.h.
|
inline |
Enables the use of multiway structuring elements. See UsingMultiwayStructures() for more information.
Definition at line 218 of file MultiscaleMedianTransform.h.
|
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.
|
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.
|
default |
Copy assignment operator. Returns a reference to this object.
|
default |
Move assignment operator. Returns a reference to this object.
|
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.
Definition at line 279 of file MultiscaleMedianTransform.h.
References pcl::Max().
|
inline |
Causes this object to perform a hybrid wavelet-median transform.
threshold | 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 default value is 5 sigma. |
Definition at line 258 of file MultiscaleMedianTransform.h.
References pcl::Max().
|
inline |
Causes this object to perform a pure multiscale median transform.
Definition at line 300 of file MultiscaleMedianTransform.h.
|
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.