Contains a RGB filter configuration that can be used with a PvBufferConverter. More...
Public Member Functions | |
| PvBufferConverterRGBFilter () | |
| Constructor. | |
| virtual | ~PvBufferConverterRGBFilter () |
| Destructor. | |
| double | GetGainR () const |
| Get the filter's gain (red). More... | |
| double | GetGainG () const |
| Get the filter's gain (green). More... | |
| double | GetGainB () const |
| Get the filter's gain (blue). More... | |
| void | SetGainR (double aValue) |
| Set the filter's gain (red) More... | |
| void | SetGainG (double aValue) |
| Set the filter's gain (green) More... | |
| void | SetGainB (double aValue) |
| Set the filter's gain (blue). More... | |
| int32_t | GetOffsetR () const |
| Get the filter's offset (red). More... | |
| int32_t | GetOffsetG () const |
| Get the filter's offset (green). More... | |
| int32_t | GetOffsetB () const |
| Get the filter's offset (blue). More... | |
| void | SetOffsetR (int32_t aValue) |
| Set the filter's offset (red) More... | |
| void | SetOffsetG (int32_t aValue) |
| Set the filter's offset (green) More... | |
| void | SetOffsetB (int32_t aValue) |
| Set the filter's offset (blue) More... | |
| PvResult | WhiteBalance (PvBuffer *aBuffer) |
| Calculate white-balance gains. More... | |
| void | Reset () |
| Reset the RGB filter configuration. More... | |
Friends | |
| class | PvBufferConverter |
Contains a RGB filter configuration that can be used with a PvBufferConverter.
To configure an RGB filter (manual):
To configure a white balance filter (automatic):
| double PvBufferConverterRGBFilter::GetGainB | ( | ) | const |
| double PvBufferConverterRGBFilter::GetGainG | ( | ) | const |
| double PvBufferConverterRGBFilter::GetGainR | ( | ) | const |
| int32_t PvBufferConverterRGBFilter::GetOffsetB | ( | ) | const |
| int32_t PvBufferConverterRGBFilter::GetOffsetG | ( | ) | const |
| int32_t PvBufferConverterRGBFilter::GetOffsetR | ( | ) | const |
| void PvBufferConverterRGBFilter::Reset | ( | ) |
Reset the RGB filter configuration.
This method resets the RGB filter configuration (PvBufferConverterRGBFilter) to its default values.
Gains are set to 1; offsets, to 0. After a reset, applying the filter doesn't change the image.
| void PvBufferConverterRGBFilter::SetGainB | ( | double | aValue | ) |
Set the filter's gain (blue).
The SetGain* and SetOffset methods let you control the transformation made by the filter, for the colors red, green, and blue.
The transformation uses the form:
x' = kx + y
where:
To set a filter's values, use:
To get a filter's values, use:
| [in] | aValue | The new gain (blue). |
| void PvBufferConverterRGBFilter::SetGainG | ( | double | aValue | ) |
| void PvBufferConverterRGBFilter::SetGainR | ( | double | aValue | ) |
| void PvBufferConverterRGBFilter::SetOffsetB | ( | int32_t | aValue | ) |
| void PvBufferConverterRGBFilter::SetOffsetG | ( | int32_t | aValue | ) |
| void PvBufferConverterRGBFilter::SetOffsetR | ( | int32_t | aValue | ) |
Calculate white-balance gains.
The WhiteBalance method receives an image and calculates appropriate gains to white-balance the image. This method sets the gains as if having called SetGainB, SetGainG, and SetGainR.
Internally, the WhiteBalance method uses the following procedure:
The WhiteBalance method produces the best results for images that have an even mix of dark and light tones, and an even mix of colors.
| [in] | aBuffer | The sample image; the image upon which to base the white-balance settings. |
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com