Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvRangeFilter Class Reference

Increases the contrast of displayed images and exported H.264 video by constraining the image to a minimum and maximum range of pixel values. Provides a histogram to analyze the dynamic range. More...

Public Member Functions

 ~PvRangeFilter ()
 Destructor.
 
PvBufferProcess (PvBuffer *aBuffer)
 Applies the range filter to an image in a buffer. More...
 
PvResult GetHistogram (uint32_t *aHistogramPtr, uint32_t aHistogramSize, uint32_t &aMaxValue)
 Retrieves histogram information for the last processed image. More...
 
void Reset ()
 Resets the filter. More...
 
void AutoConfigure ()
 Automatically configures the minimum and maximum thresholds to the lightest and darkest pixel values in the image using the latest histogram information available.
 
bool IsEnabled () const
 Returns whether the filter is enabled. More...
 
uint8_t GetDark () const
 Returns the dark threshold for the filter. More...
 
uint8_t GetLight () const
 Returns the light threshold for the filter. More...
 
void SetDark (uint8_t aValue)
 Sets the dark threshold for the filter. More...
 
void SetLight (uint8_t aValue)
 Sets the light threshold for the filter. More...
 
void SetEnabled (bool aEnabled)
 Sets whether the filter is enabled. More...
 
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...
 
PvBufferConverterGetConverter ()
 Returns a reference to the internal buffer converter. More...
 

Detailed Description

Increases the contrast of displayed images and exported H.264 video by constraining the image to a minimum and maximum range of pixel values. Provides a histogram to analyze the dynamic range.

If you remapped the dynamic range of the image using the eBUS SDK histogram feature, please note the following:

TIFF or raw binary format: The image filtering configuration is not used for the image files that you
save. Images are saved without any modification, which is beneficial if you are performing image
processing.

BMP or MP4 video format: The image filtering configuration is used for video that you save, which
can provide greater clarity.

Constructor.

Member Function Documentation

PvBufferConverter & PvRangeFilter::GetConverter ( )

Returns a reference to the internal buffer converter.

Before performing range analysis or filtering the input buffer may be converted to a different pixel format. The converter used for this operation can be configured using this method. As an example, a RGB filter could be set or the Bayer interpolation method could be selected.

Returns
The internal buffer converter.
uint8_t PvRangeFilter::GetDark ( ) const

Returns the dark threshold for the filter.

Returns
Dark threshold.
PvResult PvRangeFilter::GetHistogram ( uint32_t *  aHistogram,
uint32_t  aHistogramSize,
uint32_t &  aMaxValue 
)

Retrieves histogram information for the last processed image.

Copies the histogram data into an array. The array must be large enough to hold at least 256 elements. Note: If the array is capable of holding more than 256 elements, the eBUS SDK will only fill the first 256 elements of the array.

Parameters
[out]aHistogramPointer to the array to copy the histogram data to.
[in]aHistogramSizeThe number of elements in the array.
[out]aMaxValueThe highest value stored in the array.
Returns
Includes:
uint8_t PvRangeFilter::GetLight ( ) const

Returns the light threshold for the filter.

Returns
Light threshold.
bool PvRangeFilter::IsEnabled ( ) const

Returns whether the filter is enabled.

Returns
True if the filter is enabled, false otherwise.
PvResult PvRangeFilter::Load ( PvConfigurationReader aReader)

Loads the filter configuration from a configuration file.

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

Applies the range filter to an image in a buffer.

If the filter is disabled, the input buffer is returned. If the filter is enabled, the range filter is applied and a pointer to the buffer containing the processed data is returned.

Parameters
[in]aBufferInput image buffer.
Returns
The processed buffer if enabled, the input buffer if disabled, or NULL if the buffer does not contain an image.
void PvRangeFilter::Reset ( )

Resets the filter.

Disables the filter and resets the minimum and maximum thresholds to 0 and 255.

PvResult PvRangeFilter::Save ( PvConfigurationWriter aWriter)

Saves the filter configuration to a configuration file.

Parameters
[in]aWriterConfiguration writer to which filter configuration is saved.
Returns
Includes:
void PvRangeFilter::SetDark ( uint8_t  aValue)

Sets the dark threshold for the filter.

Must be between 0 and 254 and smaller than the light threshold.

Parameters
[in]aValueNew dark threshold.
void PvRangeFilter::SetEnabled ( bool  aEnabled)

Sets whether the filter is enabled.

Parameters
[in]aEnabledFilter enabled.
void PvRangeFilter::SetLight ( uint8_t  aValue)

Sets the light threshold for the filter.

Must be between 1 and 255 and greater than the dark threshold.

Parameters
[in]aValueNew light threshold.

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

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