Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvImageAnalysisMono Class Reference

Performs image analyse on an image. More...

Public Member Functions

 PvImageAnalysisMono ()
 Constructor.
 
 ~PvImageAnalysisMono ()
 Destructor.
 
PvResult Process (PvBuffer *aBuffer)
 Analyze a buffer. More...
 
PvResult GetHistogram (uint32_t *aHistogram, int aBufferSize, int &aHistogramSize, uint32_t &aMaxValue)
 Retrieves histogram information about the last processed image. More...
 
double GetAvg () const
 Average of the pixels in the ROI in the last analyzed image. More...
 
double GetStdDev () const
 Standard deviation of the pixels in the ROI in the last analyzed image. More...
 
void GetROI (int &aX, int &aY, int &aWidth, int &aHeight)
 Returns the ROI configured for image analysis. More...
 
void SetROI (int aX, int aY, int aWidth, int aHeight)
 Sets the ROI used for image analysis. More...
 
void Reset ()
 Resets the configuration and results of the analysis object.
 
PvResult Load (PvConfigurationReader *aReader)
 Loads the filter configuration from a configuration file. More...
 
PvResult Save (PvConfigurationWriter *aWriter)
 Saves the filter configuration to a configuration file. More...
 

Detailed Description

Performs image analyse on an image.

Call the Process method on a PvBuffer and the use accessors to retrieve information extracted from the image.

Member Function Documentation

double PvImageAnalysisMono::GetAvg ( ) const

Average of the pixels in the ROI in the last analyzed image.

Returns
Average.
PvResult PvImageAnalysisMono::GetHistogram ( uint32_t *  aHistogram,
int  aBufferSize,
int &  aHistogramSize,
uint32_t &  aMaxValue 
)

Retrieves histogram information about the last processed image.

Copies the histogram data in a buffer. The buffer has to be 256 items or bigger.

Parameters
[out]aHistogramPointer to a buffer where to copy the histogram data.
[in]aBufferSizeThe size of buffer (in uint32_t items count, not bytes) where the histogram data is to be copied. In doubt, use the maximum buffer size: 65536.
[out]aHistogramSizeThe effective size of the histogram (in items). Dependent on bit-depth of PvBuffer used in Process.
[out]aMaxValueThe maximum value for one histogram bin.
Returns
Includes:
void PvImageAnalysisMono::GetROI ( int &  aX,
int &  aY,
int &  aWidth,
int &  aHeight 
)

Returns the ROI configured for image analysis.

Parameters
[out]aXROI upper-left corner X coordinate.
[out]aYROI upper-left corner Y coordinate.
[out]aWidthROI width in pixels.
[out]aHeightROI height in pixels.
double PvImageAnalysisMono::GetStdDev ( ) const

Standard deviation of the pixels in the ROI in the last analyzed image.

Returns
Standard deviation.
PvResult PvImageAnalysisMono::Load ( PvConfigurationReader aReader)

Loads the filter configuration from a configuration file.

Parameters
[in]aReaderConfiguration reader from which to load the filter configuration.
Returns
Includes:
PvResult PvImageAnalysisMono::Process ( PvBuffer aBuffer)

Analyze a buffer.

Computes the histogram, average, etc. on the input buffer. Use the class properties to retrieve the information about calling this method.

Parameters
[in]aBufferInput image buffer.
Returns
Includes:
PvResult PvImageAnalysisMono::Save ( PvConfigurationWriter aWriter)

Saves the filter configuration to a configuration file.

Parameters
[in]aWriterConfiguration writer to which filter configuration is saved.
Returns
Includes:
void PvImageAnalysisMono::SetROI ( int  aX,
int  aY,
int  aWidth,
int  aHeight 
)

Sets the ROI used for image analysis.

The new ROI is only validated on the next Process call as the width and height of the buffer is unknown at this time.

Parameters
[in]aXROI upper-left corner X coordinate.
[in]aYROI upper-left corner Y coordinate.
[in]aWidthROI width in pixels.
[in]aHeightROI height in pixels.

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

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com