PCL
|
Separable filter in two dimensions. More...
#include <SeparableFilter.h>
Public Types | |
using | coefficient = float |
using | coefficient_matrix = GenericMatrix< coefficient > |
using | coefficient_vector = GenericVector< coefficient > |
Public Member Functions | |
SeparableFilter (const coefficient_vector &h, const coefficient_vector &v, const String &name=String()) | |
SeparableFilter (const SeparableFilter &)=default | |
SeparableFilter (const String &name=String()) | |
template<typename T > | |
SeparableFilter (const T *h, const T *v, int n, const String &name=String()) | |
SeparableFilter (int n, const String &name=String()) | |
template<typename T > | |
SeparableFilter (int n, const T &x, const String &name=String()) | |
SeparableFilter (SeparableFilter &&)=default | |
virtual | ~SeparableFilter () |
virtual void | Clear () |
virtual SeparableFilter * | Clone () const |
coefficient_vector | ColFilter () const |
coefficient_vector | ColumnFilter () const |
coefficient_vector | Filter (int phase) const |
bool | IsEmpty () const |
bool | IsHighPassFilter () const |
String | Name () const |
SeparableFilter & | operator= (const coefficient &x) |
SeparableFilter & | operator= (const SeparableFilter &)=default |
SeparableFilter & | operator= (SeparableFilter &&)=default |
bool | operator== (const SeparableFilter &f) const |
virtual void | Rename (const String &newName) |
virtual void | Resize (int n) |
coefficient_vector | RowFilter () const |
bool | SameCoefficients (const SeparableFilter &f) const |
int | Size () const |
double | Weight () const |
SeparableFilter stores two one-dimensional filter vectors of floating point filter coefficients, plus an optional filter name. This class provides automatic allocation and deallocation of coefficients, implicit data sharing, thread-safe access and a number of utility functions for filter management.
In the same way as the KernelFilter and Convolution PCL classes, SeparableFilter can be used with the SeparableConvolution class. In, addition, ATrousWaveletTransform also accepts a SeparableFilter as the implementation of a wavelet scaling function.
The SeparableConvolution PCL class uses separable filters to implement a separable convolution algorithm. This allows for important performance improvements, since separable convolution has O(N*n) complexity, as opposed to O(N*n^2) for non-separable convolution.
Definition at line 89 of file SeparableFilter.h.
using pcl::SeparableFilter::coefficient = float |
Represents a filter coefficient.
Definition at line 96 of file SeparableFilter.h.
Represents a two-dimensional filter matrix.
Definition at line 106 of file SeparableFilter.h.
Represents a one-dimensional filter.
Definition at line 101 of file SeparableFilter.h.
Constructs an empty SeparableFilter object with optional name.
Definition at line 111 of file SeparableFilter.h.
Constructs a SeparableFilter object with the specified size n and optional name. Filter elements are not initialized, so they will contain unpredictable values.
A SeparableFilter object must be initialized with either a zero size (which yields an empty filter), or an odd size >= 3.
Definition at line 124 of file SeparableFilter.h.
|
inline |
Constructs a SeparableFilter object with the specified size n, initial element value x, and optional name.
This constructor yields a separable filter corresponding to a box average two-dimentional filter whose weight is x.
Definition at line 141 of file SeparableFilter.h.
|
inline |
Constructs a SeparableFilter object with the specified one-dimensional row and column filter vectors h and v, respectively, and an optional name.
Definition at line 155 of file SeparableFilter.h.
|
inline |
Constructs a SeparableFilter object with the specified size n and optional name. Copies n filter coefficients from the specified static arrays h and v to the one-dimensional row and column filter vectors in this object, respectively.
Definition at line 172 of file SeparableFilter.h.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 194 of file SeparableFilter.h.
|
inlinevirtual |
Deallocates filter coefficients and yields an empy SeparableFilter object. This member function does not change the current filter name.
Definition at line 372 of file SeparableFilter.h.
|
inlinevirtual |
Returns a pointer to a dynamically allocated duplicate of this separable filter.
Definition at line 205 of file SeparableFilter.h.
Referenced by pcl::ATrousWaveletTransform::WaveletScalingFunction::WaveletScalingFunction(), pcl::ATrousWaveletTransform::WaveletScalingFunction::Set(), and pcl::SeparableConvolution::SetFilter().
|
inline |
This member function is an alias to ColumnFilter().
Definition at line 308 of file SeparableFilter.h.
|
inline |
Returns a copy of the internal one-dimensional column filter vector.
Definition at line 300 of file SeparableFilter.h.
|
inline |
Returns a copy of the internal one-dimensional filter vector corresponding to the specified phase. If phase is zero, the row filter vector is returned; otherwise the column filter vector is returned.
Definition at line 318 of file SeparableFilter.h.
|
inline |
Returns true iff this is an empy filter, i.e. if it has no coefficients.
Definition at line 284 of file SeparableFilter.h.
|
inline |
Returns true if this is a high-pass separable filter; false if this is a low-pass separable filter.
A high-pass kernel filter has one or more negative coefficients. A low-pass kernel filter is either empty or all of its coefficients are positive or zero. For separable low-pass filters, all the nonzero coefficients in both the row and column filter vectors have the same sign. If this condition doesn't hold (i.e. if coefficient signs differ) then the object is a high-pass filter.
Definition at line 343 of file SeparableFilter.h.
|
inline |
Returns the name of this SeparableFilter object.
Definition at line 244 of file SeparableFilter.h.
Referenced by operator==().
|
inline |
Assigns the specified scalar x to all filter coefficients. Returns a reference to this object.
Definition at line 224 of file SeparableFilter.h.
|
default |
Copy assignment operator. Returns a reference to this object.
|
default |
Move assignment operator. Returns a reference to this object.
|
inline |
Returns true iff this SeparableFilter object is equal to another instance f. Two SeparableFilter instances are equal if their name and filter coefficients are equal.
Definition at line 236 of file SeparableFilter.h.
References Name(), and pcl::ColorSpace::Name().
|
inlinevirtual |
Sets the name of this SeparableFilter object.
Definition at line 252 of file SeparableFilter.h.
|
inlinevirtual |
Sets the size of this separable filter. Previous filter contents are lost; the internal filter coefficient vectors will contain unpredictable values after calling this function.
Definition at line 271 of file SeparableFilter.h.
|
inline |
Returns a copy of the internal one-dimensional row filter vector.
Definition at line 292 of file SeparableFilter.h.
|
inline |
Returns true iff this SeparableFilter object has the same filter coefficients as another instance f.
Definition at line 363 of file SeparableFilter.h.
|
inline |
Returns the size of this separable filter. The filter size is the length of the one-dimensional row and column filter vectors.
Definition at line 261 of file SeparableFilter.h.
|
inline |
Returns the weight of this separable filter. The weight is equal to the product of the sums of components in the row and column filter vectors.
Definition at line 327 of file SeparableFilter.h.