52 #ifndef __PCL_SeparableFilter_h
53 #define __PCL_SeparableFilter_h
58 #include <pcl/Diagnostics.h>
125 : rowFilter( PCL_VALID_KERNEL_SIZE( n ) )
126 , colFilter( PCL_VALID_KERNEL_SIZE( n ) )
129 PCL_PRECONDITION( n == 0 || n >= 3 )
130 PCL_PRECONDITION( n == 0 || (n & 1) )
140 template <
typename T>
142 : rowFilter( x, PCL_VALID_KERNEL_SIZE( n ) )
143 , colFilter( x, PCL_VALID_KERNEL_SIZE( n ) )
146 PCL_PRECONDITION( n == 0 || n >= 3 )
147 PCL_PRECONDITION( n == 0 || (n & 1) )
171 template <
typename T>
173 : rowFilter( h, PCL_VALID_KERNEL_SIZE( n ) )
174 , colFilter( v, PCL_VALID_KERNEL_SIZE( n ) )
177 PCL_PRECONDITION( n == 0 || n >= 3 )
178 PCL_PRECONDITION( n == 0 || (n & 1) )
238 return Name() == f.
Name() && SameCoefficients( f );
254 filterName = newName.Trimmed();
263 return rowFilter.Length();
273 PCL_PRECONDITION( n == 0 || n >= 3 )
274 PCL_PRECONDITION( n == 0 || (n & 1) )
286 return rowFilter.IsEmpty();
320 return phase ? colFilter : rowFilter;
329 return rowFilter.Sum() * colFilter.Sum();
348 for ( s = *i < 0; ++i < rowFilter.End(); )
349 if ( *i != 0 && (*i < 0) != s )
353 for ( s = (s < 0) ? *i++ < 0 : s; i < colFilter.End(); ++i )
354 if ( *i != 0 && (*i < 0) != s )
365 return colFilter == f.colFilter && rowFilter == f.rowFilter;
383 coefficient_vector rowFilter;
384 coefficient_vector colFilter;
bool IsEmpty() const noexcept
const coefficient * const_iterator
int Length() const noexcept
Separable filter in two dimensions.
virtual ~SeparableFilter()
virtual SeparableFilter * Clone() const
virtual void Resize(int n)
SeparableFilter(int n, const String &name=String())
coefficient_vector RowFilter() const
SeparableFilter(const coefficient_vector &h, const coefficient_vector &v, const String &name=String())
coefficient_vector ColFilter() const
SeparableFilter(const SeparableFilter &)=default
SeparableFilter(SeparableFilter &&)=default
coefficient_vector ColumnFilter() const
virtual void Rename(const String &newName)
SeparableFilter(int n, const T &x, const String &name=String())
bool SameCoefficients(const SeparableFilter &f) const
coefficient_vector Filter(int phase) const
bool IsHighPassFilter() const
SeparableFilter(const String &name=String())
SeparableFilter(const T *h, const T *v, int n, const String &name=String())
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
String Name(int colorSpace)