Spinnaker SDK C++
4.2.0.21
 
 

 
Loading...
Searching...
No Matches
ImageStatistics Class Reference

Represents image statistics for an image. More...

#include <ImageStatistics.h>

Inheritance diagram for ImageStatistics:
IImageStatistics

Public Member Functions

 ImageStatistics ()
 Default constructor.
 
virtual ~ImageStatistics ()
 Default destructor.
 
 ImageStatistics (const ImageStatistics &other)
 Copy constructor.
 
ImageStatisticsoperator= (const ImageStatistics &other)
 Assignment operator.
 
virtual void EnableAll ()
 Enable all channels.
 
virtual void DisableAll ()
 Disable all channels.
 
virtual void EnableGreyOnly ()
 Enable only the grey channel.
 
virtual void EnableRGBOnly ()
 Enable only the RGB channels.
 
virtual void EnableHSLOnly ()
 Enable only the HSL channels.
 
virtual void GetChannelStatus (StatisticsChannel channel, bool *pEnabled) const
 Gets the status of a statistics channel.
 
virtual void SetChannelStatus (StatisticsChannel channel, bool enabled)
 Sets the status of a statistics channel.
 
virtual void GetRange (StatisticsChannel channel, unsigned int *pMin, unsigned int *pMax) const
 Gets the range of a statistics channel.
 
virtual void GetPixelValueRange (StatisticsChannel channel, unsigned int *pPixelValueMin, unsigned int *pPixelValueMax) const
 Gets the range of a statistics channel.
 
virtual void GetNumPixelValues (StatisticsChannel channel, unsigned int *pNumPixelValues) const
 Gets the number of unique pixel values in the image.
 
virtual void GetMean (StatisticsChannel channel, float *pPixelValueMean) const
 Gets the mean of the image.
 
virtual void GetHistogram (StatisticsChannel channel, int **ppHistogram) const
 Gets the histogram for the image.
 
virtual void GetStatistics (StatisticsChannel channel, unsigned int *pRangeMin=NULL, unsigned int *pRangeMax=NULL, unsigned int *pPixelValueMin=NULL, unsigned int *pPixelValueMax=NULL, unsigned int *pNumPixelValues=NULL, float *pPixelValueMean=NULL, int **ppHistogram=NULL) const
 Gets all statistics for the image.
 
- Public Member Functions inherited from IImageStatistics
virtual ~IImageStatistics ()
 
virtual void EnableAll ()=0
 
virtual void DisableAll ()=0
 
virtual void EnableGreyOnly ()=0
 
virtual void EnableRGBOnly ()=0
 
virtual void EnableHSLOnly ()=0
 
virtual void GetChannelStatus (StatisticsChannel channel, bool *pEnabled) const =0
 
virtual void SetChannelStatus (StatisticsChannel channel, bool enabled)=0
 
virtual void GetRange (StatisticsChannel channel, unsigned int *pMin, unsigned int *pMax) const =0
 
virtual void GetPixelValueRange (StatisticsChannel channel, unsigned int *pPixelValueMin, unsigned int *pPixelValueMax) const =0
 
virtual void GetNumPixelValues (StatisticsChannel channel, unsigned int *pNumPixelValues) const =0
 
virtual void GetMean (StatisticsChannel channel, float *pPixelValueMean) const =0
 
virtual void GetHistogram (StatisticsChannel channel, int **ppHistogram) const =0
 
virtual void GetStatistics (StatisticsChannel channel, unsigned int *pRangeMin=NULL, unsigned int *pRangeMax=NULL, unsigned int *pPixelValueMin=NULL, unsigned int *pPixelValueMax=NULL, unsigned int *pNumPixelValues=NULL, float *pPixelValueMean=NULL, int **ppHistogram=NULL) const =0
 

Friends

class ImageStatsCalculator
 

Additional Inherited Members

- Protected Member Functions inherited from IImageStatistics
 IImageStatistics ()
 
 IImageStatistics (const IImageStatistics &)
 

Detailed Description

Represents image statistics for an image.

Constructor & Destructor Documentation

◆ ImageStatistics() [1/2]

Default constructor.

◆ ~ImageStatistics()

virtual ~ImageStatistics ( )
virtual

Default destructor.

◆ ImageStatistics() [2/2]

ImageStatistics ( const ImageStatistics other)

Copy constructor.

Member Function Documentation

◆ DisableAll()

virtual void DisableAll ( )
virtual

Disable all channels.

Implements IImageStatistics.

◆ EnableAll()

virtual void EnableAll ( )
virtual

Enable all channels.

Implements IImageStatistics.

◆ EnableGreyOnly()

virtual void EnableGreyOnly ( )
virtual

Enable only the grey channel.

Implements IImageStatistics.

◆ EnableHSLOnly()

virtual void EnableHSLOnly ( )
virtual

Enable only the HSL channels.

Implements IImageStatistics.

◆ EnableRGBOnly()

virtual void EnableRGBOnly ( )
virtual

Enable only the RGB channels.

Implements IImageStatistics.

◆ GetChannelStatus()

virtual void GetChannelStatus ( StatisticsChannel  channel,
bool *  pEnabled 
) const
virtual

Gets the status of a statistics channel.

Parameters
channelThe statistics channel.
pEnabledWhether the channel is enabled.
See also
SetChannelStatus()

Implements IImageStatistics.

◆ GetHistogram()

virtual void GetHistogram ( StatisticsChannel  channel,
int **  ppHistogram 
) const
virtual

Gets the histogram for the image.

Parameters
channelThe statistics channel.
ppHistogramPointer to an array containing the histogram.

Implements IImageStatistics.

◆ GetMean()

virtual void GetMean ( StatisticsChannel  channel,
float *  pPixelValueMean 
) const
virtual

Gets the mean of the image.

Parameters
channelThe statistics channel.
pPixelValueMeanThe mean of the image.

Implements IImageStatistics.

◆ GetNumPixelValues()

virtual void GetNumPixelValues ( StatisticsChannel  channel,
unsigned int *  pNumPixelValues 
) const
virtual

Gets the number of unique pixel values in the image.

Parameters
channelThe statistics channel.
pNumPixelValuesThe number of unique pixel values.

Implements IImageStatistics.

◆ GetPixelValueRange()

virtual void GetPixelValueRange ( StatisticsChannel  channel,
unsigned int *  pPixelValueMin,
unsigned int *  pPixelValueMax 
) const
virtual

Gets the range of a statistics channel.

The values returned are the maximum values recorded for all pixels in the image.

Parameters
channelThe statistics channel.
pPixelValueMinThe minimum pixel value.
pPixelValueMaxThe maximum pixel value.

Implements IImageStatistics.

◆ GetRange()

virtual void GetRange ( StatisticsChannel  channel,
unsigned int *  pMin,
unsigned int *  pMax 
) const
virtual

Gets the range of a statistics channel.

The values returned are the maximum possible values for any given pixel in the image. This is generally 0-255 for 8 bit images, and 0-65535 for 16 bit images.

Parameters
channelThe statistics channel.
pMinThe minimum possible value.
pMaxThe maximum possible value.

Implements IImageStatistics.

◆ GetStatistics()

virtual void GetStatistics ( StatisticsChannel  channel,
unsigned int *  pRangeMin = NULL,
unsigned int *  pRangeMax = NULL,
unsigned int *  pPixelValueMin = NULL,
unsigned int *  pPixelValueMax = NULL,
unsigned int *  pNumPixelValues = NULL,
float *  pPixelValueMean = NULL,
int **  ppHistogram = NULL 
) const
virtual

Gets all statistics for the image.

Parameters
channelThe statistics channel.
pRangeMinThe minimum possible value.
pRangeMaxThe maximum possible value.
pPixelValueMinThe minimum pixel value.
pPixelValueMaxThe maximum pixel value.
pNumPixelValuesThe number of unique pixel values.
pPixelValueMeanThe mean of the image.
ppHistogramPointer to an array containing the histogram.

Implements IImageStatistics.

◆ operator=()

ImageStatistics & operator= ( const ImageStatistics other)

Assignment operator.

Parameters
otherThe ImageStatistics object to copy from.

◆ SetChannelStatus()

virtual void SetChannelStatus ( StatisticsChannel  channel,
bool  enabled 
)
virtual

Sets the status of a statistics channel.

Parameters
channelThe statistics channel.
enabledWhether the channel should be enabled.
See also
GetChannelStatus()

Implements IImageStatistics.

Friends And Related Symbol Documentation

◆ ImageStatsCalculator

friend class ImageStatsCalculator
friend

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