PCL
pcl::SeparableConvolution Class Reference

Discrete two-dimensional separable convolution in the spatial domain. More...

#include <SeparableConvolution.h>

+ Inheritance diagram for pcl::SeparableConvolution:

Public Types

using coefficient = SeparableFilter::coefficient
 
using coefficient_vector = SeparableFilter::coefficient_vector
 

Public Member Functions

 SeparableConvolution ()=default
 
 SeparableConvolution (const SeparableConvolution &x)
 
 SeparableConvolution (const SeparableFilter &filter)
 
 SeparableConvolution (SeparableConvolution &&)=default
 
 ~SeparableConvolution () override
 
void DisableColumnConvolution (bool disable=true)
 
void DisableHighPassRescaling (bool disable=true)
 
void DisableRawHighPass (bool disable=true)
 
void DisableRowConvolution (bool disable=true)
 
void EnableColumnConvolution (bool enable=true)
 
void EnableHighPassRescaling (bool enable=true)
 
void EnableRawHighPass (bool enable=true)
 
void EnableRowConvolution (bool enable=true)
 
const SeparableFilterFilter () const
 
coefficient_vector Filter (int phase) const
 
double FilterWeight () const
 
bool IsColumnConvolutionEnabled () const
 
bool IsHighPassFilter () const
 
bool IsHighPassRescalingEnabled () const
 
bool IsRawHighPassEnabled () const
 
bool IsRowConvolutionEnabled () const
 
SeparableConvolutionoperator= (const SeparableConvolution &x)
 
SeparableConvolutionoperator= (SeparableConvolution &&)=default
 
int OverlappingDistance () const
 
void SetFilter (const SeparableFilter &filter)
 
- Public Member Functions inherited from pcl::InterlacedTransformation
 InterlacedTransformation (const InterlacedTransformation &)=default
 
 InterlacedTransformation (int n=1)
 
 ~InterlacedTransformation () override
 
void DisableInterlacing ()
 
int InterlacingDistance () const
 
bool IsInterlaced () const
 
void SetInterlacingDistance (int n)
 
- 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
 

Static Public Member Functions

static constexpr int FasterThanNonseparableFilterSize (int numThreads)
 

Protected Member Functions

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::ImageTransformation
virtual void Apply (pcl::ComplexImage &image) const
 
virtual void Apply (pcl::DComplexImage &image) const
 

Detailed Description

SeparableConvolution implements a fully multithreaded, two-dimensional discrete separable convolution algorithm. It performs automatic fixing of border artifacts by applying Neumann boundary conditions (mirroring).

See also
Convolution, FFTConvolution, SeparableFilter

Definition at line 82 of file SeparableConvolution.h.

Member Typedef Documentation

◆ coefficient

Represents a filter coefficient.

Definition at line 90 of file SeparableConvolution.h.

◆ coefficient_vector

Represents a one-dimensional filter.

Definition at line 95 of file SeparableConvolution.h.

Constructor & Destructor Documentation

◆ SeparableConvolution() [1/4]

pcl::SeparableConvolution::SeparableConvolution ( )
default

Default constructor.

Note
This constructor yields an uninitialized instance that cannot be used before explicit association with a SeparableFilter instance.

◆ SeparableConvolution() [2/4]

pcl::SeparableConvolution::SeparableConvolution ( const SeparableFilter filter)
inline

Constructs a SeparableConvolution object with the specified filter.

Parameters
filterResponse function, or convolution filter. The specified object does not have to remain valid while this instance is actively used, since SeparableConvolution owns a private copy of the separable filter (note that SeparableFilter is a reference-counted class).

Definition at line 114 of file SeparableConvolution.h.

◆ SeparableConvolution() [3/4]

pcl::SeparableConvolution::SeparableConvolution ( const SeparableConvolution x)
inline

Copy constructor.

Definition at line 122 of file SeparableConvolution.h.

◆ SeparableConvolution() [4/4]

pcl::SeparableConvolution::SeparableConvolution ( SeparableConvolution &&  )
default

Move constructor.

◆ ~SeparableConvolution()

pcl::SeparableConvolution::~SeparableConvolution ( )
inlineoverride

Destroys a SeparableConvolution object.

Definition at line 144 of file SeparableConvolution.h.

Member Function Documentation

◆ Apply() [1/5]

void pcl::SeparableConvolution::Apply ( pcl::DImage image) const
overrideprotectedvirtual

Applies this transformation to a 64-bit floating point image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [2/5]

void pcl::SeparableConvolution::Apply ( pcl::Image image) const
overrideprotectedvirtual

Applies this transformation to a 32-bit floating point image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [3/5]

void pcl::SeparableConvolution::Apply ( pcl::UInt16Image image) const
overrideprotectedvirtual

Applies this transformation to a 16-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [4/5]

void pcl::SeparableConvolution::Apply ( pcl::UInt32Image image) const
overrideprotectedvirtual

Applies this transformation to a 32-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [5/5]

void pcl::SeparableConvolution::Apply ( pcl::UInt8Image image) const
overrideprotectedvirtual

Applies this transformation to an 8-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ DisableColumnConvolution()

void pcl::SeparableConvolution::DisableColumnConvolution ( bool  disable = true)
inline

Disables (or enables) convolution of pixel columns.

This is a convenience function, equivalent to: EnableColumnConvolution( !disable )

Definition at line 368 of file SeparableConvolution.h.

◆ DisableHighPassRescaling()

void pcl::SeparableConvolution::DisableHighPassRescaling ( bool  disable = true)
inline

Disables (or enables) high-pass rescaling of out-of-range convolved pixel values. See the documentation for IsHighPassRescalingEnabled() for more information.

Definition at line 281 of file SeparableConvolution.h.

◆ DisableRawHighPass()

void pcl::SeparableConvolution::DisableRawHighPass ( bool  disable = true)
inline

Disables (or enables) raw high-pass convolution. See the documentation for IsRawHighPassEnabled() for more information.

Definition at line 314 of file SeparableConvolution.h.

◆ DisableRowConvolution()

void pcl::SeparableConvolution::DisableRowConvolution ( bool  disable = true)
inline

Disables (or enables) convolution of pixel rows.

This is a convenience function, equivalent to: EnableRowConvolution( !disable )

Definition at line 341 of file SeparableConvolution.h.

◆ EnableColumnConvolution()

void pcl::SeparableConvolution::EnableColumnConvolution ( bool  enable = true)
inline

Enables (or disables) convolution of pixel columns.

Definition at line 357 of file SeparableConvolution.h.

◆ EnableHighPassRescaling()

void pcl::SeparableConvolution::EnableHighPassRescaling ( bool  enable = true)
inline

Enables (or disables) high-pass rescaling of out-of-range convolved pixel values. See the documentation for IsHighPassRescalingEnabled() for more information.

Definition at line 271 of file SeparableConvolution.h.

◆ EnableRawHighPass()

void pcl::SeparableConvolution::EnableRawHighPass ( bool  enable = true)
inline

Enables (or disables) raw high-pass convolution. See the documentation for IsRawHighPassEnabled() for more information.

Definition at line 305 of file SeparableConvolution.h.

◆ EnableRowConvolution()

void pcl::SeparableConvolution::EnableRowConvolution ( bool  enable = true)
inline

Enables (or disables) convolution of pixel rows.

Definition at line 330 of file SeparableConvolution.h.

◆ Filter() [1/2]

const SeparableFilter& pcl::SeparableConvolution::Filter ( ) const
inline

Returns a constant reference to the separable filter currently associated with this SeparableConvolution object.

Note
If this object has not been initialized, this member function throws an Error exception.

Definition at line 183 of file SeparableConvolution.h.

◆ Filter() [2/2]

coefficient_vector pcl::SeparableConvolution::Filter ( int  phase) const
inline

Returns a copy of the internal vector of filter coefficients corresponding to the specified phase. If phase is zero, the one-dimensional row filter is returned; otherwise the one-dimensional column filter is returned.

Note
If this object has not been initialized, this member function throws an Error exception.

Definition at line 198 of file SeparableConvolution.h.

◆ FilterWeight()

double pcl::SeparableConvolution::FilterWeight ( ) const
inline

Returns the current filter weight. The filter weight is computed each time a separable filter is associated with this object. It is only applied for low-pass filters as a normalization factor. For more information, see the documentation for SeparableFilter::Weight().

The filter weight and other filter properties are cached in private data members for quick reference.

Definition at line 222 of file SeparableConvolution.h.

◆ IsColumnConvolutionEnabled()

bool pcl::SeparableConvolution::IsColumnConvolutionEnabled ( ) const
inline

Returns true iff this object will convolve pixel columns on target images.

Definition at line 349 of file SeparableConvolution.h.

◆ IsHighPassFilter()

bool pcl::SeparableConvolution::IsHighPassFilter ( ) const
inline

Returns true if the separable filter currently associated with this SeparableConvolution object is a high-pass filter; false if it is a low-pass filter. For more information, see the documentation for SeparableFilter::IsHighPassFilter().

Each time a separable filter is associated with this object, its high-pass nature is checked and stored, along with other filter properties, in private data members. This allows for quick lookup of critical filter characteristics without degrading performance.

Definition at line 238 of file SeparableConvolution.h.

◆ IsHighPassRescalingEnabled()

bool pcl::SeparableConvolution::IsHighPassRescalingEnabled ( ) const
inline

Returns true iff out-of-range values will be rescaled for normalization of images after convolution with a high-pass filter.

A high-pass filter has negative coefficients. As a result, some pixels in the convolved image may have negative values. Saturated pixels (values above one) can also result, depending on the filter coefficients. The standard behavior is to truncate out-of-range pixel values to the [0,1] range, which preserves the dynamics of the convolved image, so high-pass rescaling is disabled by default. When high-pass rescaling is enabled, the resulting image is normalized (that is, rescaled to [0,1] only if there are out-of-range values) and hence all the data after convolution are preserved at the cost of reducing the overall contrast of the image. Finally, if raw high-pass convolution has been enabled, out-of-range values are neither truncated nor rescaled irrespective of the value returned by this function. See the documentation for IsRawHighPassEnabled() for more information.

Definition at line 261 of file SeparableConvolution.h.

◆ IsRawHighPassEnabled()

bool pcl::SeparableConvolution::IsRawHighPassEnabled ( ) const
inline

Returns true iff raw high-pass convolution is enabled. When raw high-pass convolution is enabled, out-of-range values after convolution with a high-pass filter are neither truncated nor normalized. Note that this is only relevant to convolution of floating point data.

Raw high-pass convolution is disabled by default. For more information on out-of-range convolution results, refer to the documentation for IsHighPassRescalingEnabled().

Definition at line 296 of file SeparableConvolution.h.

◆ IsRowConvolutionEnabled()

bool pcl::SeparableConvolution::IsRowConvolutionEnabled ( ) const
inline

Returns true iff this object will convolve pixel rows on target images.

Definition at line 322 of file SeparableConvolution.h.

◆ operator=() [1/2]

SeparableConvolution& pcl::SeparableConvolution::operator= ( const SeparableConvolution x)
inline

Copy assignment operator. Returns a reference to this object.

Definition at line 151 of file SeparableConvolution.h.

◆ operator=() [2/2]

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

Move assignment operator. Returns a reference to this object.

◆ OverlappingDistance()

int pcl::SeparableConvolution::OverlappingDistance ( ) const
inline

Returns the length in pixels of the overlapping regions between adjacent areas processed by parallel execution threads. The overlapping distance is a function of the filter size and the interlacing distance.

Definition at line 378 of file SeparableConvolution.h.

◆ SetFilter()

void pcl::SeparableConvolution::SetFilter ( const SeparableFilter filter)
inline

Sets a new filter to be applied by this SeparableConvolution object.

Definition at line 207 of file SeparableConvolution.h.

References pcl::SeparableFilter::Clone().


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