52 #ifndef __PCL_SeparableConvolution_h
53 #define __PCL_SeparableConvolution_h
58 #include <pcl/Diagnostics.h>
65 #define __PCL_SEPARABLE_CONVOLUTION_TINY_WEIGHT 1.0e-20
125 , m_weight( x.m_weight )
126 , m_highPass( x.m_highPass )
127 , m_rawHighPass( x.m_rawHighPass )
128 , m_rescaleHighPass( x.m_rescaleHighPass )
129 , m_convolveRows( x.m_convolveRows )
130 , m_convolveCols( x.m_convolveCols )
132 if ( !x.m_filter.IsNull() )
133 m_filter = x.m_filter->Clone();
155 (void)InterlacedTransformation::operator =( x );
156 (void)ParallelProcess::operator =( x );
157 if ( x.m_filter.IsNull() )
160 m_filter = x.m_filter->Clone();
161 m_weight = x.m_weight;
162 m_highPass = x.m_highPass;
163 m_rawHighPass = x.m_rawHighPass;
164 m_rescaleHighPass = x.m_rescaleHighPass;
165 m_convolveRows = x.m_convolveRows;
166 m_convolveCols = x.m_convolveCols;
185 PCL_PRECONDITION( !m_filter.IsNull() )
200 PCL_PRECONDITION( !m_filter.IsNull() )
201 return m_filter->Filter( phase );
209 m_filter = filter.
Clone();
210 CacheFilterProperties();
263 return m_rescaleHighPass;
273 m_rescaleHighPass = enable;
283 EnableHighPassRescaling( !disable );
298 return m_rawHighPass;
307 m_rawHighPass = enable;
316 EnableRawHighPass( !disable );
324 return m_convolveRows;
332 m_convolveRows = enable;
343 EnableRowConvolution( !disable );
351 return m_convolveCols;
359 m_convolveCols = enable;
370 EnableColumnConvolution( !disable );
380 PCL_PRECONDITION( !m_filter.IsNull() )
381 return m_filter->Size() + (m_filter->Size() - 1)*(InterlacingDistance() - 1);
398 #ifdef __PCL_COMPATIBILITY
402 if ( numThreads >= 32 )
404 if ( numThreads >= 16 )
406 if ( numThreads >= 8 )
408 if ( numThreads >= 4 )
416 if ( numThreads >= 32 )
418 if ( numThreads >= 28 )
420 if ( numThreads >= 24 )
422 if ( numThreads >= 16 )
424 if ( numThreads >= 8 )
426 if ( numThreads >= 4 )
428 if ( numThreads >= 2 )
446 bool m_highPass =
false;
451 bool m_rawHighPass =
false;
452 bool m_rescaleHighPass =
false;
453 bool m_convolveRows =
true;
454 bool m_convolveCols =
true;
467 void CacheFilterProperties()
469 PCL_PRECONDITION( !m_filter.
IsNull() )
470 PCL_PRECONDITION( !m_filter->IsEmpty() )
472 m_highPass = m_filter->IsHighPassFilter();
473 m_weight = m_filter->Weight();
474 if (
pcl::
Abs( m_weight ) < __PCL_SEPARABLE_CONVOLUTION_TINY_WEIGHT )
478 void ValidateFilter() const;
A smart pointer with exclusive object ownership and optional automatic object destruction.
Implements a generic, two-dimensional, shared or local image.
A process using multiple concurrent execution threads.
Discrete two-dimensional separable convolution in the spatial domain.
void Apply(pcl::Image &) const override
bool IsRowConvolutionEnabled() const
SeparableConvolution(SeparableConvolution &&)=default
void DisableHighPassRescaling(bool disable=true)
const SeparableFilter & Filter() const
SeparableConvolution(const SeparableConvolution &x)
int OverlappingDistance() const
SeparableConvolution()=default
bool IsColumnConvolutionEnabled() const
void Apply(pcl::UInt8Image &) const override
void Apply(pcl::UInt32Image &) const override
bool IsHighPassRescalingEnabled() const
void EnableHighPassRescaling(bool enable=true)
void DisableColumnConvolution(bool disable=true)
bool IsHighPassFilter() const
void DisableRawHighPass(bool disable=true)
void EnableRowConvolution(bool enable=true)
void EnableColumnConvolution(bool enable=true)
coefficient_vector Filter(int phase) const
void DisableRowConvolution(bool disable=true)
SeparableConvolution(const SeparableFilter &filter)
double FilterWeight() const
~SeparableConvolution() override
SeparableFilter::coefficient coefficient
void EnableRawHighPass(bool enable=true)
void Apply(pcl::UInt16Image &) const override
bool IsRawHighPassEnabled() const
void SetFilter(const SeparableFilter &filter)
void Apply(pcl::DImage &) const override
Separable filter in two dimensions.
virtual SeparableFilter * Clone() const
GenericVector< coefficient > coefficient_vector
T Abs(const Complex< T > &c) noexcept
static constexpr int FasterThanNonseparableFilterSize(int numThreads)