52 #ifndef __PCL_FFTRegistration_h
53 #define __PCL_FFTRegistration_h
108 : m_fftReference( std::move( x.m_fftReference ) )
124 return !m_fftReference.IsEmpty();
140 m_fftReference = DoInitialize( image );
158 case 32: m_fftReference = DoInitialize(
static_cast<const ComplexImage&
>( *image ) );
break;
159 case 64: m_fftReference = DoInitialize(
static_cast<const DComplexImage&
>( *image ) );
break;
164 case 32: m_fftReference = DoInitialize(
static_cast<const Image&
>( *image ) );
break;
165 case 64: m_fftReference = DoInitialize(
static_cast<const DImage&
>( *image ) );
break;
170 case 8: m_fftReference = DoInitialize(
static_cast<const UInt8Image&
>( *image ) );
break;
171 case 16: m_fftReference = DoInitialize(
static_cast<const UInt16Image&
>( *image ) );
break;
172 case 32: m_fftReference = DoInitialize(
static_cast<const UInt32Image&
>( *image ) );
break;
186 return m_fftReference;
196 m_fftReference.FreeData();
208 PCL_PRECONDITION( IsInitialized() )
209 if ( IsInitialized() )
222 PCL_PRECONDITION( IsInitialized() )
223 if ( IsInitialized() )
234 case 32: DoEvaluate(
static_cast<const pcl::Image&
>( *image ) );
break;
235 case 64: DoEvaluate(
static_cast<const pcl::DImage&
>( *image ) );
break;
240 case 8: DoEvaluate(
static_cast<const pcl::UInt8Image&
>( *image ) );
break;
241 case 16: DoEvaluate(
static_cast<const pcl::UInt16Image&
>( *image ) );
break;
242 case 32: DoEvaluate(
static_cast<const pcl::UInt32Image&
>( *image ) );
break;
259 virtual void DoEvaluate(
const pcl::Image& ) = 0;
290 template <
class O>
inline
293 if ( !R.IsInitialized() )
294 R.Initialize( image );
337 return m_largeTranslations;
352 if ( enable != m_largeTranslations )
355 m_largeTranslations = enable;
374 EnableLargeTranslations( !disable );
427 bool m_largeTranslations =
false;
443 void DoEvaluate(
const pcl::Image& )
override;
492 return m_evaluateScaling;
500 if ( enable != m_evaluateScaling )
503 m_evaluateScaling = enable;
515 EnableScalingEvaluation( !disable );
526 return m_lowFrequencyCutoff;
535 return LowFrequencyCutoff() > 0;
550 m_lowFrequencyCutoff =
Range( r, 0.0F, 0.5F );
561 return m_rotationAngle;
572 return m_scalingRatio;
578 bool m_evaluateScaling =
false;
581 float m_lowFrequencyCutoff = 1.0F/200;
584 float m_rotationAngle = 0.0F;
585 float m_scalingRatio = 1.0F;
595 void DoEvaluate(
const pcl::Image& )
override;
Base class of FFT-based image registration algorithms.
void Initialize(const pcl::GenericImage< P > &image)
const ComplexImage & DFTOfReferenceImage() const
void Initialize(const ImageVariant &image)
FFTRegistrationEngine()=default
void Evaluate(const ImageVariant &image)
virtual ~FFTRegistrationEngine()
FFTRegistrationEngine(const FFTRegistrationEngine &)=default
FFTRegistrationEngine(FFTRegistrationEngine &&x)
void Evaluate(const pcl::GenericImage< P > &image)
bool IsInitialized() const
FFT registration engine: rotation and scaling
bool EvaluatesScaling() const
float ScalingRatio() const
float LowFrequencyCutoff() const
FFTRotationAndScaling()=default
void EnableScalingEvaluation(bool enable=true)
float RotationAngle() const
void SetLowFrequencyCutoff(float r)
bool HasLowFrequencyCutoff() const
~FFTRotationAndScaling() override
void DisableScalingEvaluation(bool disable=true)
FFT registration engine: translation
const FPoint & Delta() const
void EnableLargeTranslations(bool enable=true)
bool AreLargeTranslationsEnabled() const
void DisableLargeTranslations(bool disable=true)
~FFTTranslation() override
Implements a generic, two-dimensional, shared or local image.
A generic point in the two-dimensional space.
Acts like a union for all types of images in PCL, with optional class-wide ownership of transported i...
bool IsFloatSample() const noexcept
bool IsComplexSample() const noexcept
int BitsPerSample() const noexcept
Array< T, A > & operator<<(Array< T, A > &x, const V &v)
constexpr const T & Range(const T &x, const T &a, const T &b) noexcept