PCL
|
Fourier-based two-dimensional convolution in the spatial domain. More...
#include <FFTConvolution.h>
Static Public Member Functions | |
static constexpr int | FasterThanNonseparableFilterSize (int numThreads) |
static constexpr int | FasterThanSeparableFilterSize (int numThreads) |
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 |
FFTConvolution implements a fully multithreaded, two-dimensional discrete convolution algorithm via fast Fourier transforms. It performs automatic fixing of border artifacts by applying Neumann boundary conditions (mirroring), and is able to convolve images and response functions of arbitrary sizes, only limited by the available memory.
Definition at line 87 of file FFTConvolution.h.
|
default |
Default constructor.
|
inline |
Constructs an FFTConvolution instance with the specified kernel filter.
filter | Response function, or convolution filter. The specified object does not have to remain valid while this FFTConvolution instance is actively used, since it owns a private copy of the filter (note that KernelFilter is a reference-counted class). |
Definition at line 109 of file FFTConvolution.h.
|
inline |
Constructs an FFTConvolution instance with the specified response function image.
f | A reference to an ImageVariant whose transported image is the response function, or convolution filter. The transported image must remain valid while this FFTConvolution instance is actively used, or until a new response function is associated with this instance. The specified ImageVariant doesn't have to remain valid, since a FFTConvolution instance owns a private ImageVariant that transports the response function image. |
Definition at line 128 of file FFTConvolution.h.
|
inline |
Copy constructor.
Definition at line 137 of file FFTConvolution.h.
|
default |
Move constructor.
|
inlineoverride |
Destroys an FFTConvolution object.
Definition at line 155 of file FFTConvolution.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 |
Causes this object to apply to real images by storing the magnitude of the complex convolution result. This is the default behavior.
Definition at line 325 of file FFTConvolution.h.
|
inline |
Causes this object to apply to real images by copying the real component of the complex convolved result.
Definition at line 314 of file FFTConvolution.h.
|
inline |
Returns a reference to the kernel filter currently associated with this FFTConvolution object. If this object does not use a kernel filter, either because it uses an image as its response function, or because this object has not been initialized, the returned filter is empty (i.e., it has no filter coefficients and zero dimensions).
Definition at line 199 of file FFTConvolution.h.
|
inline |
Returns a reference to the filter image currently associated with this FFTConvolution object. The referenced ImageVariant object will transport no image if this object does not use a filter image, either because it uses a kernel filter as its response function, or because this object has not been initialized.
The response function is actually the image transported by the returned ImageVariant. It can be an image of any supported data type.
Definition at line 215 of file FFTConvolution.h.
|
inline |
Returns true if this object applies to real images by storing the magnitude of the complex convolution result. This is the default behavior.
Returns false if this object applies to real images by copying the real component of the complex convolved result.
Definition at line 303 of file FFTConvolution.h.
|
inline |
Returns true if this object applies to real images by copying the real component of the complex convolved result.
Returns false if this object applies to real images by storing the magnitude of the complex convolution result. This is the default behavior.
Definition at line 288 of file FFTConvolution.h.
|
inline |
Copy assignment operator. Returns a reference to this object.
Definition at line 162 of file FFTConvolution.h.
|
default |
Move assignment operator. Returns a reference to this object.
|
inline |
Returns a pointer to the discrete Fourier transform (DFT) of the complex response function used internally by this FFTConvolution object, or nullptr if the response function has not been created yet.
The internal DFT of the response function is created and initialized the first time this FFTConvolution object is used to perform a convolution. It is reused to save memory and CPU resources, as long as successive transformations apply to target images with the same dimensions, or otherwise it is re-created on the fly, as necessary. It is destroyed when a new filter is associated with this object.
This function returns a pointer to a complex image that stores the DFT of the original filter after transforming it to wrap around order. This means that the original filter data has been splitted, mirrored, and redistributed to occupy the four corners of the complex 2-D matrix prior to calculating its DFT.
If this object has not been initialized, the returned pointer is nullptr.
Definition at line 273 of file FFTConvolution.h.
|
inline |
Sets a new filter image as the response function to be applied by this FFTConvolution object.
The image transported by the specified ImageVariant must remain valid while this FFTConvolution instance is actively used, or until a new response function is associated with this instance. The ImageVariant doesn't have to remain valid, since this object owns a private ImageVariant that transports the response function image.
Definition at line 245 of file FFTConvolution.h.
|
inline |
Sets a new kernel filter as the response function to be applied by this FFTConvolution object.
The specified object does not have to remain valid while this FFTConvolution instance is actively used, since it owns a private copy of the filter (note that KernelFilter is a reference-counted class).
Definition at line 228 of file FFTConvolution.h.
References pcl::KernelFilter::Clone().
|
inline |
Returns true if this FFTConvolution uses a KernelFilter object as its response function; false if it uses an image.
Definition at line 187 of file FFTConvolution.h.