PCL
pcl::WinsorizedSigmaClippingRejection Class Reference

Winsorized sigma clipping outlier rejection algorithm. More...

#include <WinsorizedSigmaClippingRejection.h>

Public Member Functions

 WinsorizedSigmaClippingRejection ()=default
 
 WinsorizedSigmaClippingRejection (const WinsorizedSigmaClippingRejection &)=default
 
virtual ~WinsorizedSigmaClippingRejection ()
 
bool ClipHigh () const
 
bool ClipLow () const
 
void DisableHighClipping (bool disable=true)
 
void DisableLowClipping (bool disable=true)
 
void EnableHighClipping (bool enable=true)
 
void EnableLowClipping (bool enable=true)
 
float HighSigma () const
 
float LowSigma () const
 
template<class C , typename I >
void operator() (I &i, I &j, double &mean, double &sigma, C &data) const
 
WinsorizedSigmaClippingRejectionoperator= (const WinsorizedSigmaClippingRejection &)=default
 
template<class C , typename I >
void PerformRejection (I &i, I &j, double &mean, double &sigma, C &data) const
 
void SetHighSigma (float sigma)
 
void SetLowSigma (float sigma)
 
void SetWinsorizationCutoff (float cutoff)
 
float WinsorizationCutoff () const
 

Detailed Description

This class implements a robust iterative sigma clipping outlier rejection algorithm based on Huber's method of robust estimation of parameters through Winsorization. This algorithm can yield superior rejection of outliers and better preservation of significant data for relatively large data sets, with a small performance penalty compared to a simple sigma clipping scheme.

See also
RobustChauvenetRejection

Definition at line 80 of file WinsorizedSigmaClippingRejection.h.

Constructor & Destructor Documentation

◆ WinsorizedSigmaClippingRejection() [1/2]

pcl::WinsorizedSigmaClippingRejection::WinsorizedSigmaClippingRejection ( )
default

Default constructor.

◆ WinsorizedSigmaClippingRejection() [2/2]

pcl::WinsorizedSigmaClippingRejection::WinsorizedSigmaClippingRejection ( const WinsorizedSigmaClippingRejection )
default

Copy constructor.

◆ ~WinsorizedSigmaClippingRejection()

virtual pcl::WinsorizedSigmaClippingRejection::~WinsorizedSigmaClippingRejection ( )
inlinevirtual

Virtual destructor.

Definition at line 97 of file WinsorizedSigmaClippingRejection.h.

Member Function Documentation

◆ ClipHigh()

bool pcl::WinsorizedSigmaClippingRejection::ClipHigh ( ) const
inline

Returns true iff rejection of high sample values is enabled. High sample values are values greater than the (robust) mean of the sample being analyzed.

Definition at line 121 of file WinsorizedSigmaClippingRejection.h.

◆ ClipLow()

bool pcl::WinsorizedSigmaClippingRejection::ClipLow ( ) const
inline

Returns true iff rejection of low sample values is enabled. Low sample values are values smaller than the (robust) mean of the sample being analyzed.

Definition at line 111 of file WinsorizedSigmaClippingRejection.h.

◆ DisableHighClipping()

void pcl::WinsorizedSigmaClippingRejection::DisableHighClipping ( bool  disable = true)
inline

Disables rejection of high values. See ClipHigh() for more information on this parameter.

Definition at line 157 of file WinsorizedSigmaClippingRejection.h.

◆ DisableLowClipping()

void pcl::WinsorizedSigmaClippingRejection::DisableLowClipping ( bool  disable = true)
inline

Disables rejection of low values. See ClipLow() for more information on this parameter.

Definition at line 139 of file WinsorizedSigmaClippingRejection.h.

◆ EnableHighClipping()

void pcl::WinsorizedSigmaClippingRejection::EnableHighClipping ( bool  enable = true)
inline

Enables rejection of high values. See ClipHigh() for more information on this parameter.

Definition at line 148 of file WinsorizedSigmaClippingRejection.h.

◆ EnableLowClipping()

void pcl::WinsorizedSigmaClippingRejection::EnableLowClipping ( bool  enable = true)
inline

Enables rejection of low values. See ClipLow() for more information on this parameter.

Definition at line 130 of file WinsorizedSigmaClippingRejection.h.

◆ HighSigma()

float pcl::WinsorizedSigmaClippingRejection::HighSigma ( ) const
inline

Returns the high sigma parameter of the rejection algorithm.

Values greater than the mean and located at distances from the mean greater than this parameter in sigma units will be rejected in successive iterations. The lower this parameter, the more data will be rejected at the upper tail of the sample.

The default high sigma parameter value is 3 sigma.

Definition at line 187 of file WinsorizedSigmaClippingRejection.h.

◆ LowSigma()

float pcl::WinsorizedSigmaClippingRejection::LowSigma ( ) const
inline

Returns the low sigma parameter of the rejection algorithm.

Values smaller than the mean and located at distances from the mean greater than this parameter in sigma units will be rejected in successive iterations. The lower this parameter, the more data will be rejected at the lower tail of the sample.

The default low sigma parameter value is 3 sigma.

Definition at line 172 of file WinsorizedSigmaClippingRejection.h.

◆ operator()()

template<class C , typename I >
void pcl::WinsorizedSigmaClippingRejection::operator() ( I &  i,
I &  j,
double &  mean,
double &  sigma,
C &  data 
) const
inline

Performs a Winsorized sigma clipping rejection procedure.

This operator is equivalent to the PerformRejection() const member function.

Note
This function is thread-safe.

Definition at line 326 of file WinsorizedSigmaClippingRejection.h.

◆ operator=()

WinsorizedSigmaClippingRejection& pcl::WinsorizedSigmaClippingRejection::operator= ( const WinsorizedSigmaClippingRejection )
default

Copy assignment operator. Returns a reference to this object.

◆ PerformRejection()

template<class C , typename I >
void pcl::WinsorizedSigmaClippingRejection::PerformRejection ( I &  i,
I &  j,
double &  mean,
double &  sigma,
C &  data 
) const
inline

Performs a Winsorized sigma clipping rejection procedure for the specified data.

Parameters
[out]iReference to a variable where the function will store the zero-based index of the first non-rejected element in the sorted data array.
[out]jReference to a variable where the function will store the zero-based index of the end of the non-rejected sequence in the sorted data array.
[out]meanReference to a variable where the function will store the mean of the subset of non-rejected elements in the data array.
[out]sigmaReference to a variable where the function will store the standard deviation of the subset of non-rejected elements in the data array.
[in,out]dataRandom-access container of objects to be analyzed and rejected. On output, the elements in this container will be sorted in ascending order.

On output, the subset of non-rejected array elements is defined by the range [i,j) of zero-based array indices relative to the beginning of the data container. The elements in the data container will be sorted in ascending order.

This function will perform a robust, iterative sigma clipping outlier rejection procedure using Winsorization to compute sample location and scale parameters at each iteration. On output, the robust location and scale parameters of the non-rejected subset will be returned in the specified mean and sigma variables, respectively.

The template parameter C represents a vector or array-like container with indexed random access. If T is the type of an element in a container of type C, the following operators must be implicitly or explicitly defined:

T::operator double() const;
bool T::operator <( const T& ) const;
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
Definition: Array.h:2101

The type represented by the I template parameter should correspond to an integral scalar type such as int, unsigned, etc.

Note
This function is thread-safe.

Definition at line 290 of file WinsorizedSigmaClippingRejection.h.

◆ SetHighSigma()

void pcl::WinsorizedSigmaClippingRejection::SetHighSigma ( float  sigma)
inline

Sets the value of the high sigma parameter. See HighSigma() for more information on this parameter.

Definition at line 206 of file WinsorizedSigmaClippingRejection.h.

References pcl::Max().

◆ SetLowSigma()

void pcl::WinsorizedSigmaClippingRejection::SetLowSigma ( float  sigma)
inline

Sets the value of the low sigma parameter. See LowSigma() for more information on this parameter.

Definition at line 196 of file WinsorizedSigmaClippingRejection.h.

References pcl::Max().

◆ SetWinsorizationCutoff()

void pcl::WinsorizedSigmaClippingRejection::SetWinsorizationCutoff ( float  cutoff)
inline

Sets the value of the Winsorization cutoff parameter of the rejection algorithm in sigma units. See WinsorizationCutoff() for more information on this parameter.

Definition at line 234 of file WinsorizedSigmaClippingRejection.h.

References pcl::Max().

◆ WinsorizationCutoff()

float pcl::WinsorizedSigmaClippingRejection::WinsorizationCutoff ( ) const
inline

Returns the Winsorization cutoff parameter of the rejection algorithm in sigma units.

All values with absolute differences from the mean larger than this parameter will be set equal to the mean of the sample in the first rejection iteration. This replaces extreme outliers with plausible values instead of their nearest neighbors, which avoids contamination with extreme spurious values.

The default Winsorization cutoff is 5 sigma.

Definition at line 224 of file WinsorizedSigmaClippingRejection.h.


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