Spinnaker C
4.3.0.189
 
Functions
ImageStatistics Access

The functions in this section provide access to information and functionality related to image statistics. This includes context creation and destruction, the enabling and disabling of channels, and value retrieval. More...

Functions

SPINNAKERC_API spinImageStatisticsCreate (spinImageStatistics *phStatistics)
 Creates an image statistics context. More...
 
SPINNAKERC_API spinImageStatisticsDestroy (spinImageStatistics hStatistics)
 Destroys an image statistics context. More...
 
SPINNAKERC_API spinImageStatisticsEnableAll (spinImageStatistics hStatistics)
 Enables all channels of an image statistics context. More...
 
SPINNAKERC_API spinImageStatisticsDisableAll (spinImageStatistics hStatistics)
 Disables all channels of an image statistics context. More...
 
SPINNAKERC_API spinImageStatisticsEnableGreyOnly (spinImageStatistics hStatistics)
 Disables all channels of an image statistics context except grey-scale. More...
 
SPINNAKERC_API spinImageStatisticsEnableRgbOnly (spinImageStatistics hStatistics)
 Disables all channels of an image statistics context except red, blue, and green. More...
 
SPINNAKERC_API spinImageStatisticsEnableHslOnly (spinImageStatistics hStatistics)
 Disables all channels of an image statistics context except hue, saturation, and lightness. More...
 
SPINNAKERC_API spinImageStatisticsGetChannelStatus (spinImageStatistics hStatistics, spinStatisticsChannel channel, bool8_t *pbEnabled)
 Checks whether an image statistics context is enabled. More...
 
SPINNAKERC_API spinImageStatisticsSetChannelStatus (spinImageStatistics hStatistics, spinStatisticsChannel channel, bool8_t bEnable)
 Sets the status of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetRange (spinImageStatistics hStatistics, spinStatisticsChannel channel, unsigned int *pMin, unsigned int *pMax)
 Retrieves the range of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetPixelValueRange (spinImageStatistics hStatistics, spinStatisticsChannel channel, unsigned int *pMin, unsigned int *pMax)
 Retrieves the pixel value range of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetNumPixelValues (spinImageStatistics hStatistics, spinStatisticsChannel channel, unsigned int *pNumValues)
 Retrieves the number of pixel values of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetMean (spinImageStatistics hStatistics, spinStatisticsChannel channel, float *pMean)
 Retrieves the mean of pixel values of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetHistogram (spinImageStatistics hStatistics, spinStatisticsChannel channel, int **ppHistogram)
 Retrieves a histogram of an image statistics channel. More...
 
SPINNAKERC_API spinImageStatisticsGetAll (spinImageStatistics hStatistics, spinStatisticsChannel channel, unsigned int *pRangeMin, unsigned int *pRangeMax, unsigned int *pPixelValueMin, unsigned int *pPixelValueMax, unsigned int *pNumPixelValues, float *pPixelValueMean, int **ppHistogram)
 Retrieves all available information of an image statistics channel. More...
 

Detailed Description

The functions in this section provide access to information and functionality related to image statistics. This includes context creation and destruction, the enabling and disabling of channels, and value retrieval.

Function Documentation

◆ spinImageStatisticsCreate()

SPINNAKERC_API spinImageStatisticsCreate ( spinImageStatistics phStatistics)

Creates an image statistics context.

Parameters
phStatisticsThe statistics handle pointer in which the image statistics context is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsDestroy()

SPINNAKERC_API spinImageStatisticsDestroy ( spinImageStatistics  hStatistics)

Destroys an image statistics context.

See also
spinError
Parameters
hStatisticsThe image statistics context to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsDisableAll()

SPINNAKERC_API spinImageStatisticsDisableAll ( spinImageStatistics  hStatistics)

Disables all channels of an image statistics context.

See also
spinError
Parameters
hStatisticsThe image statistics context to disable all channels
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsEnableAll()

SPINNAKERC_API spinImageStatisticsEnableAll ( spinImageStatistics  hStatistics)

Enables all channels of an image statistics context.

See also
spinError
Parameters
hStatisticsThe image statistics context to enable all channels
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsEnableGreyOnly()

SPINNAKERC_API spinImageStatisticsEnableGreyOnly ( spinImageStatistics  hStatistics)

Disables all channels of an image statistics context except grey-scale.

See also
spinError
Parameters
hStatisticsThe image statistics context to enable only grey
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsEnableHslOnly()

SPINNAKERC_API spinImageStatisticsEnableHslOnly ( spinImageStatistics  hStatistics)

Disables all channels of an image statistics context except hue, saturation, and lightness.

See also
spinError
Parameters
hStatisticsThe image statistics context to enable only HSL
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsEnableRgbOnly()

SPINNAKERC_API spinImageStatisticsEnableRgbOnly ( spinImageStatistics  hStatistics)

Disables all channels of an image statistics context except red, blue, and green.

See also
spinError
Parameters
hStatisticsThe image statistics context to enable only RGB
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetAll()

SPINNAKERC_API spinImageStatisticsGetAll ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
unsigned int *  pRangeMin,
unsigned int *  pRangeMax,
unsigned int *  pPixelValueMin,
unsigned int *  pPixelValueMax,
unsigned int *  pNumPixelValues,
float *  pPixelValueMean,
int **  ppHistogram 
)

Retrieves all available information of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel of the information to retrieve
pRangeMinThe unsigned integer pointer in which the minimum value of the range is returned
pRangeMaxThe unsigned integer pointer in which the maximum value of the range is returned
pPixelValueMinThe unsigned integer pointer in which the minimum pixel value of the range is returned
pPixelValueMaxThe unsigned integer pointer in which the maximum pixel value of the range is returned
pNumPixelValuesThe unsigned integer pointer in which the number of pixel values is returned
pPixelValueMeanThe float pointer in which the mean pixel value is returned
ppiHistogramThe pointer to the pointer in which the histogram data is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetChannelStatus()

SPINNAKERC_API spinImageStatisticsGetChannelStatus ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
bool8_t pbEnabled 
)

Checks whether an image statistics context is enabled.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel to check
pbEnabledThe boolean pointer to return whether or not the channel is enabled
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetHistogram()

SPINNAKERC_API spinImageStatisticsGetHistogram ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
int **  ppHistogram 
)

Retrieves a histogram of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel of the histogram to be returned
pHistogramThe pointer to the integer pointer in which the histogram data is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetMean()

SPINNAKERC_API spinImageStatisticsGetMean ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
float *  pMean 
)

Retrieves the mean of pixel values of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel of the mean pixel value to be retrieved
pMeanThe float pointer in which the mean pixel value is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetNumPixelValues()

SPINNAKERC_API spinImageStatisticsGetNumPixelValues ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
unsigned int *  pNumValues 
)

Retrieves the number of pixel values of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel where the pixel values to be counted are
iNumValuesThe unsigned integer pointer in which the number of pixel values is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetPixelValueRange()

SPINNAKERC_API spinImageStatisticsGetPixelValueRange ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
unsigned int *  pMin,
unsigned int *  pMax 
)

Retrieves the pixel value range of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel of the pixel value range to retrieve
pMinThe unsigned integer pointer in which the minimum value of the pixel value range is returned
pMaxThe unsigned integer pointer in which the maximum value of the pixel value range is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsGetRange()

SPINNAKERC_API spinImageStatisticsGetRange ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
unsigned int *  pMin,
unsigned int *  pMax 
)

Retrieves the range of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel of the range to retrieve
pMinThe unsigned integer pointer in which the minimum value of the range is returned
pMaxThe unsigned integer pointer in which the maximum value of the range is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageStatisticsSetChannelStatus()

SPINNAKERC_API spinImageStatisticsSetChannelStatus ( spinImageStatistics  hStatistics,
spinStatisticsChannel  channel,
bool8_t  bEnable 
)

Sets the status of an image statistics channel.

See also
spinError
Parameters
hStatisticsThe image statistics context of the channel
channelThe channel to enable/disable
bEnableThe boolean value to set; true enables, false disables
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error