PCL
|
Base class of all redundant multiscale transforms. More...
#include <RedundantMultiscaleTransform.h>
Public Types | |
using | layer = Image |
using | layer_state_set = GenericVector< bool > |
using | transform = Array< layer > |
Protected Member Functions | |
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 |
Protected Member Functions inherited from pcl::BidirectionalImageTransformation | |
virtual void | Transform (const pcl::ComplexImage &image) |
virtual void | Transform (const pcl::DComplexImage &image) |
virtual void | Transform (const pcl::DImage &image) |
virtual void | Transform (const pcl::Image &image) |
virtual void | Transform (const pcl::UInt16Image &image) |
virtual void | Transform (const pcl::UInt32Image &image) |
virtual void | Transform (const pcl::UInt8Image &image) |
A redundant multiscale transform 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, so the generated multiscale transform is called redundant. Two well-known examples of redundant multiscale transform algorithms are the à trous (with holes) wavelet transform, also known as starlet transform, and the multiscale median transform.
In all cases the reconstruction algorithm consists of the sum of all wj multiscale layers for 1 <= j <= N, plus the residual layer cN.
In our implementation, each layer in a redundant multiscale 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 difference coefficients. Pixel samples in a detail layer can be negative, zero or positive real values.
The last layer, at index N, is the large-scale residual layer. Pixel samples in the residual layer image can only be positive or zero real values.
Definition at line 102 of file RedundantMultiscaleTransform.h.
Represents a multiscale layer.
Definition at line 110 of file RedundantMultiscaleTransform.h.
Represents a set of layer enabled/disabled states.
Definition at line 120 of file RedundantMultiscaleTransform.h.
Represents a set of multiscale layers, or multiscale transform.
Definition at line 115 of file RedundantMultiscaleTransform.h.
|
inline |
Constructs a redundant multiscale transform.
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 linear or nonlinear operations with kernels of size 2*s + 1. The scaling sequence parameter d is interpreted as follows:
Definition at line 146 of file RedundantMultiscaleTransform.h.
|
inline |
Copy constructor.
Definition at line 158 of file RedundantMultiscaleTransform.h.
|
default |
Move constructor.
|
inlineoverride |
Destroys a RedundantMultiscaleTransform object. All existing layers are destroyed and deallocated.
Definition at line 178 of file RedundantMultiscaleTransform.h.
|
overrideprotectedvirtual |
Applies this transformation to a 32-bit complex image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to a 64-bit complex image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to a 64-bit floating point image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to a 32-bit floating point image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to a 16-bit unsigned integer image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to a 32-bit unsigned integer image.
Reimplemented from pcl::ImageTransformation.
|
overrideprotectedvirtual |
Applies this transformation to an 8-bit unsigned integer image.
Reimplemented from pcl::ImageTransformation.
|
inline |
Biases a multiscale transform layer.
i | Layer index, 0 <= i <= n, where n is the number of generated multiscale layers. If i == n, the residual layer is biased. |
k | Bias factor. Positive biases increase the relative weight of biased layers in image reconstructions (inverse transforms). Negative biases decrease relative layer weights. A zero bias factor does not change a layer. |
This member function can be used to enhance or attenuate image structures at selected scales. Consider this code:
In the example above, the second and fourth layers of a multiscale transform have been biased. The layer at index 1 (the second layer) has been enhanced because a positive layer bias has been applied (2.5). The layer at index 3 (fourth layer) has been attenuated because a negative bias (-1) has been applied.
Definition at line 477 of file RedundantMultiscaleTransform.h.
|
inline |
Deletes the layer at layer index i, 0 <= i <= n, where n is the number of generated layers. If i == n this member function deletes the large-scale residual layer.
Deleted layers are excluded from image reconstructions performed by subsequent inverse multiscale transforms.
For example, if you delete the first two layers of a transform, a subsequent inverse transform will remove all small-scale image structures smaller than four pixels, assuming a dyadic scaling sequence.
Definition at line 376 of file RedundantMultiscaleTransform.h.
|
inline |
Disables or enables the layer at index i, 0 <= i <= n, where n is the number of generated layers. If i == n, this member function disables or enables the large-scale residual layer.
This is a convenience function, equivalent to: EnableLayer( i, !disable );
Definition at line 425 of file RedundantMultiscaleTransform.h.
|
inline |
Enables or disables the layer at index i, 0 <= i <= n, where n is the number of generated layers. If i == n, this member function enables or disables the large-scale residual layer.
Disabled layers are not generated during multiscale transforms, so they are obviously excluded from image reconstructions (inverse transforms). This has the advantage that a lot of memory can be saved if one or more layers aren't required or have to be excluded from the inverse transform.
For the reason explained, disabling layers is more efficient, in terms of memory consumption, if done before the multiscale transform. When the transform has already been performed, disabling one or more layers excludes them from reconstructions, but does not delete them, so the after-transformation layer disable operation, unlike layer deletion, is reversible.
Definition at line 411 of file RedundantMultiscaleTransform.h.
|
inline |
Returns the filter size for the specified layer j. Returns an odd integer larger than or equal to three. For the dyadic scaling sequence, the returned value is equal to 1 + 2*2^j (3, 5, 9, 17, 33, ...). For a linear scaling sequence with distance d, returns 1 + 2*d*(1 + j).
Definition at line 271 of file RedundantMultiscaleTransform.h.
|
inline |
Returns true iff the layer at layer index i exists (0 <= i <= n, where n is the number of generated layers), that is, if the multiscale transform has been generated and the specified layer has been calculated (because it was not disabled) and has not been deleted.
Definition at line 388 of file RedundantMultiscaleTransform.h.
|
inline |
Returns true iff the layer at index i is enabled, false if it is disabled. See the documentation for EnableLayer( int, bool ) for detailed information about disabled layers.
Definition at line 435 of file RedundantMultiscaleTransform.h.
|
inline |
Returns a reference to the (mutable) layer at scale index i. This is an overloaded member function, provided for convenience.
See Layer( int ) const for more information.
Definition at line 330 of file RedundantMultiscaleTransform.h.
|
inline |
Returns a reference to the immutable layer at scale index i, 0 <= i <= n, where n is the number of generated detail layers. If i == n, this member function returns a reference to the large-scale residual layer.
Definition at line 318 of file RedundantMultiscaleTransform.h.
|
inline |
Returns the number of detail layers that will be (or have been) generated by this transform.
The number returned does not include the residual layer. In other words, the total number of layers generated is always equal to one plus the value returned by this member function, since the large-scale residual layer is always generated by all multiscale transforms.
Definition at line 285 of file RedundantMultiscaleTransform.h.
|
inline |
Copy assignment operator. Returns a reference to this object.
Definition at line 185 of file RedundantMultiscaleTransform.h.
References pcl::Array< T, A >::EnsureUnique().
|
default |
Move assignment operator. Returns a reference to this object.
|
inline |
Returns a reference to the (mutable) layer at scale index i. This is a convenience operator, equivalent to:
The array subscript operators can produce more elegant code than the Layer functions.
Definition at line 359 of file RedundantMultiscaleTransform.h.
|
inline |
Returns a reference to the (immutable) layer at scale index i. This is a convenience operator, equivalent to:
The array subscript operators can produce more elegant code than the Layer functions.
Definition at line 345 of file RedundantMultiscaleTransform.h.
|
inlinevirtual |
Returns the set of layers in this transform, after clearing the transform without destroying its layers, whose ownership is then transferred to the caller.
If no multiscale transform has been performed, this function returns an empty set.
The caller is responsible for deallocation of the returned layers. After calling this function, this object will be empty, just as if no transform had been performed.
Definition at line 496 of file RedundantMultiscaleTransform.h.
|
inlinevirtual |
Destroys and deallocates all existing layers and resets all layer states so that all layers are enabled.
Definition at line 507 of file RedundantMultiscaleTransform.h.
|
inline |
Returns the scaling sequence used by this multiscale transform.
Successive layers are computed by applying linear on nonlinear operations with kernels of size 2*s + 1.
If the value returned by this function is zero 0, then the transform uses the dyadic sequence: s = 1, 2, 4, ..., 2^j for 0 <= j < n.
If the returned value is > 0, it is the constant increment in pixels between two successive scales (linear scaling sequence): s = d*j for 1 <= j < n.
Definition at line 215 of file RedundantMultiscaleTransform.h.
|
inline |
Selects the dyadic scaling sequence for this multiscale transform.
This is a convenience function, equivalent to: SetScalingSequence( 0 );
Definition at line 245 of file RedundantMultiscaleTransform.h.
|
inline |
Selects a linear scaling sequence with distance d in pixels.
This is a convenience function, equivalent to: SetScalingSequence( d );
Definition at line 259 of file RedundantMultiscaleTransform.h.
References pcl::Max().
|
inline |
Sets the number of detail layers that will be generated by this transform.
n | Number of detail layers, not including the last, large-scale residual layer. Must be n >= 1. |
Definition at line 300 of file RedundantMultiscaleTransform.h.
References pcl::Max().
|
inline |
Sets the scaling sequence d used by this multiscale transform.
For the meaning of the d scaling sequence parameter, see the documentation for the ScalingSequence() member function.
Definition at line 229 of file RedundantMultiscaleTransform.h.
References pcl::Max().