PCL
pcl::DisplayFunction Class Reference

Adaptive histogram transformations for image visualization. More...

#include <DisplayFunction.h>

+ Inheritance diagram for pcl::DisplayFunction:

Public Member Functions

 DisplayFunction ()
 
 DisplayFunction (const DisplayFunction &)=default
 
template<class V >
 DisplayFunction (const V &m, const V &s, const V &h, const V &l=V(), const V &r=V())
 
 DisplayFunction (DisplayFunction &&)=default
 
 ~DisplayFunction () override
 
double ClippingPoint () const
 
template<class V >
void ComputeAutoStretch (const V &sigma, const V &center)
 
template<class V >
void GetDisplayFunctionParameters (V &m, V &s, V &h, V &l, V &r) const
 
Array< HistogramTransformationHistogramTransformations () const
 
bool IsIdentityTransformation () const
 
bool IsIdentityTransformation (int i) const
 
bool LinkedRGB () const
 
DisplayFunctionoperator= (const DisplayFunction &)=default
 
DisplayFunctionoperator= (DisplayFunction &&)=default
 
HistogramTransformation operator[] (int i) const
 
void Reset ()
 
void SetClippingPoint (double clip)
 
void SetLinkedRGB (bool link=true)
 
double TargetBackground () const
 
- Public Member Functions inherited from pcl::ImageTransformation
 ImageTransformation ()=default
 
 ImageTransformation (const ImageTransformation &)=default
 
virtual ~ImageTransformation ()
 
template<class P >
GenericImage< P > & operator>> (GenericImage< P > &image) const
 
ImageVariantoperator>> (ImageVariant &image) const
 

Friends

void Swap (DisplayFunction &x, DisplayFunction &y)
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::ImageTransformation
virtual void Apply (pcl::ComplexImage &image) const
 
virtual void Apply (pcl::DComplexImage &image) const
 

Detailed Description

DisplayFunction implements a set of histogram transformations for visualization of linear images.

Definition at line 93 of file DisplayFunction.h.

Constructor & Destructor Documentation

◆ DisplayFunction() [1/4]

pcl::DisplayFunction::DisplayFunction ( )
inline

Default constructor. Constructs an identity display function.

Definition at line 100 of file DisplayFunction.h.

◆ DisplayFunction() [2/4]

template<class V >
pcl::DisplayFunction::DisplayFunction ( const V &  m,
const V &  s,
const V &  h,
const V &  l = V(),
const V &  r = V() 
)
inline

Constructs a display function with the specified parameters.

Parameters
mVector of midtones balance parameters.
sVector of shadows clipping point parameters.
hVector of highlights clipping point parameters.
lVector of shadows dynamic range expansion parameters.
rVector of highlights dynamic range expansion parameters.

Each argument vector can have from zero to four components (additional vector components are ignored, and missing components are replaced with default identity transformation parameters). Vector indices 0, 1, 2 and 3 correspond to the red/gray, green, blue and lightness components for histogram transformations.

For detailed information on parameter values and valid ranges, see the HistogramTransformation class.

Definition at line 125 of file DisplayFunction.h.

◆ DisplayFunction() [3/4]

pcl::DisplayFunction::DisplayFunction ( const DisplayFunction )
default

Copy constructor.

◆ DisplayFunction() [4/4]

pcl::DisplayFunction::DisplayFunction ( DisplayFunction &&  )
default

Move constructor.

◆ ~DisplayFunction()

pcl::DisplayFunction::~DisplayFunction ( )
inlineoverride

Destroys a DisplayFunction object.

Definition at line 162 of file DisplayFunction.h.

Member Function Documentation

◆ ClippingPoint()

double pcl::DisplayFunction::ClippingPoint ( ) const
inline

Returns the clipping point parameter of this transformation, in sigma units from the central value.

Definition at line 250 of file DisplayFunction.h.

◆ ComputeAutoStretch()

template<class V >
void pcl::DisplayFunction::ComputeAutoStretch ( const V &  sigma,
const V &  center 
)
inline

Computes adaptive display functions, also known as auto-stretch functions, based on statistical estimates of scale and location.

Parameters
sigmaVector of scale estimates. This is typically a vector of normalized MAD values (median absolute deviation from the median) or similar robust dispersion estimates.
centerVector of location estimates. Typically the median is used as a robust estimator of central tendency.

Both vectors must have one or three components, respectively for a monochrome (grayscale) or RGB color image. Avoid using non-robust statistical estimators such as the standard deviation or the mean, which can easily lead to completely wrong results.

To obtain results coherent with other implementations, scale estimates should be normalized to be consistent with the standard deviation of a normal distribution. For example, if MAD values are used, they should be multiplied by 1.4826 before calling this function.

Definition at line 327 of file DisplayFunction.h.

◆ GetDisplayFunctionParameters()

template<class V >
void pcl::DisplayFunction::GetDisplayFunctionParameters ( V &  m,
V &  s,
V &  h,
V &  l,
V &  r 
) const
inline

Gets a copy of all display function parameters in the specified vectors.

Parameters
[out]mVector of midtones balance parameters.
[out]sVector of shadows clipping point parameters.
[out]hVector of highlights clipping point parameters.
[out]lVector of shadows dynamic range expansion parameters.
[out]rVector of highlights dynamic range expansion parameters.

On output, each vector will have four components with the histogram transformation parameters for the red/gray, green, blue and lightness image components at vector indexes 0, 1, 2 and 3, respectively.

Definition at line 212 of file DisplayFunction.h.

◆ HistogramTransformations()

Array<HistogramTransformation> pcl::DisplayFunction::HistogramTransformations ( ) const
inline

Returns a dynamic array of histogram transformations.

The returned object contains four HistogramTransformation instances, where array indexes 0, 1, 2 and 3 correspond to the red/gray, green, blue and lightness components, respectively.

Definition at line 190 of file DisplayFunction.h.

◆ IsIdentityTransformation() [1/2]

bool pcl::DisplayFunction::IsIdentityTransformation ( ) const
inline

Returns true iff this is an identity display function for the four image components (red/gray, green, blue and lightness).

An identity display function is a no-op: it does not alter the pixel data or properties of the target images to which it is applied.

Definition at line 238 of file DisplayFunction.h.

◆ IsIdentityTransformation() [2/2]

bool pcl::DisplayFunction::IsIdentityTransformation ( int  i) const
inline

Returns true only if this object defines an identity display function for the specified channel index i.

An identity display function is a no-op: it does not alter the pixel data or properties of the target images to which it is applied.

Definition at line 224 of file DisplayFunction.h.

◆ LinkedRGB()

bool pcl::DisplayFunction::LinkedRGB ( ) const
inline

Returns true iff this transformation will compute a single adaptive histogram transformation for the nominal channels of an RGB color image. Returns false if adaptive per-channel transformations will be calculated separately.

Definition at line 288 of file DisplayFunction.h.

◆ operator=() [1/2]

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

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

DisplayFunction& pcl::DisplayFunction::operator= ( DisplayFunction &&  )
default

Move assignment operator. Returns a reference to this object.

◆ operator[]()

HistogramTransformation pcl::DisplayFunction::operator[] ( int  i) const
inline

Array subscript operator. Returns an histogram transformation for the specified channel index i, which must be in the range [0,3].

Channel indices 0, 1, 2 and 3 correspond to the red/gray, green, blue and lightness components, respectively. If an out-of-range channel index is specified, this operator returns an identity histogram transformation.

Definition at line 174 of file DisplayFunction.h.

◆ Reset()

void pcl::DisplayFunction::Reset ( )
inline

Resets all display function parameters to yield an identity transformation.

Definition at line 413 of file DisplayFunction.h.

◆ SetClippingPoint()

void pcl::DisplayFunction::SetClippingPoint ( double  clip)
inline

Sets the clipping point parameter of this transformation, in sigma units from the central value. The default clipping point is -2.8.

Definition at line 259 of file DisplayFunction.h.

◆ SetLinkedRGB()

void pcl::DisplayFunction::SetLinkedRGB ( bool  link = true)
inline

Sets the 'linked RGB' parameter of this transformation. When this parameter is true, a single adaptive histogram transformation will be computed for the nominal channels of an RGB color image. When this parameter is false, separate adaptive transformations will be calculated for each channel.

Definition at line 300 of file DisplayFunction.h.

◆ TargetBackground()

double pcl::DisplayFunction::TargetBackground ( ) const
inline

Returns the target background parameter of this transformation in the normalized [0,1] range.

Definition at line 268 of file DisplayFunction.h.

Friends And Related Function Documentation

◆ Swap

void Swap ( DisplayFunction x,
DisplayFunction y 
)
friend

Exchanges two DisplayFunction objects.

Definition at line 423 of file DisplayFunction.h.


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