PCL
pcl::Convolution Class Reference

Discrete two-dimensional, nonseparable convolution in the spatial domain. More...

#include <Convolution.h>

+ Inheritance diagram for pcl::Convolution:

Public Member Functions

 Convolution ()=default
 
 Convolution (const KernelFilter &filter)
 
 Convolution (const Convolution &x)
 
 Convolution (Convolution &&)=default
 
virtual ~Convolution ()
 
void DisableHighPassRescaling (bool disable=true)
 
void DisableRawHighPass (bool disable=true)
 
void EnableHighPassRescaling (bool enable=true)
 
void EnableRawHighPass (bool enable=true)
 
const KernelFilterFilter () const
 
double FilterWeight () const
 
bool IsHighPassFilter () const
 
bool IsHighPassRescalingEnabled () const
 
bool IsRawHighPassEnabled () const
 
Convolutionoperator= (const Convolution &x)
 
Convolutionoperator= (Convolution &&)=default
 
int OverlappingDistance () const
 
void SetFilter (const KernelFilter &filter)
 
- Public Member Functions inherited from pcl::InterlacedTransformation
 InterlacedTransformation (int n=1)
 
 InterlacedTransformation (const InterlacedTransformation &)=default
 
virtual ~InterlacedTransformation ()
 
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::ThresholdedTransformation
 ThresholdedTransformation (double low=0, double high=0)
 
 ThresholdedTransformation (const ThresholdedTransformation &)=default
 
virtual ~ThresholdedTransformation ()
 
double HighThreshold () const
 
bool IsThresholded () const
 
double LowThreshold () const
 
void SetHighThreshold (double t)
 
void SetLowThreshold (double t)
 
- Public Member Functions inherited from pcl::ParallelProcess
 ParallelProcess ()=default
 
 ParallelProcess (const ParallelProcess &)=default
 
void DisableParallelProcessing (bool disable=true)
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0)
 
bool IsParallelProcessingEnabled () const
 
int MaxProcessors () const
 
ParallelProcessoperator= (const ParallelProcess &)=default
 
void SetMaxProcessors (int maxProcessors)
 
void Swap (ParallelProcess &process)
 

Protected Member Functions

void Apply (pcl::Image &) const override
 
void Apply (pcl::DImage &) const override
 
void Apply (pcl::UInt8Image &) const override
 
void Apply (pcl::UInt16Image &) const override
 
void Apply (pcl::UInt32Image &) 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

TODO: Write a detailed description for Convolution.

Note
ImageTransformation is a virtual base class of Convolution.

Definition at line 82 of file Convolution.h.

Constructor & Destructor Documentation

◆ Convolution() [1/4]

pcl::Convolution::Convolution ( )
default

Default constructor.

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

◆ Convolution() [2/4]

pcl::Convolution::Convolution ( const KernelFilter filter)
inline

Constructs a Convolution instance 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 Convolution owns a private copy of the filter (note that KernelFilter is a reference-counted class).

Definition at line 105 of file Convolution.h.

◆ Convolution() [3/4]

pcl::Convolution::Convolution ( const Convolution x)
inline

Copy constructor.

Definition at line 113 of file Convolution.h.

◆ Convolution() [4/4]

pcl::Convolution::Convolution ( Convolution &&  )
default

Move constructor.

◆ ~Convolution()

virtual pcl::Convolution::~Convolution ( )
inlinevirtual

Destroys this Convolution object.

Definition at line 132 of file Convolution.h.

Member Function Documentation

◆ Apply() [1/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [2/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [3/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [4/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [5/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ DisableHighPassRescaling()

void pcl::Convolution::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 253 of file Convolution.h.

◆ DisableRawHighPass()

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

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

Definition at line 286 of file Convolution.h.

◆ EnableHighPassRescaling()

void pcl::Convolution::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 243 of file Convolution.h.

◆ EnableRawHighPass()

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

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

Definition at line 277 of file Convolution.h.

◆ Filter()

const KernelFilter& pcl::Convolution::Filter ( ) const
inline

Returns a reference to the kernel filter currently associated with this Convolution object.

If this object has not been initialized, this member function returns an empty kernel filter.

Definition at line 170 of file Convolution.h.

◆ FilterWeight()

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

Returns the current filter weight. The filter weight is computed each time a kernel 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 KernelFilter::Weight().

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

Definition at line 194 of file Convolution.h.

◆ IsHighPassFilter()

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

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

Each time a kernel 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 210 of file Convolution.h.

◆ IsHighPassRescalingEnabled()

bool pcl::Convolution::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 233 of file Convolution.h.

◆ IsRawHighPassEnabled()

bool pcl::Convolution::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 268 of file Convolution.h.

◆ operator=() [1/2]

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

Copy assignment operator. Returns a reference to this object.

Definition at line 139 of file Convolution.h.

◆ operator=() [2/2]

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

Move assignment operator. Returns a reference to this object.

◆ OverlappingDistance()

int pcl::Convolution::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 296 of file Convolution.h.

References pcl::Abs(), pcl::Apply(), and pcl::AutoPointer< T, D >::IsNull().

◆ SetFilter()

void pcl::Convolution::SetFilter ( const KernelFilter filter)
inline

Sets a new kernel filter to be applied by this Convolution object.

Definition at line 179 of file Convolution.h.

References pcl::KernelFilter::Clone().


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