43 double Red() const noexcept
45 return static_cast<double>(red_) / ConversionFactor;
43 double Red() const noexcept {
…}
55 if ((red < 0.0) || (red > MaxFactor))
58 red_ =
static_cast<int>(red * ConversionFactor);
68 return static_cast<double>(green_) / ConversionFactor;
78 if ((green < 0.0) || (green > MaxFactor))
81 green_ =
static_cast<int>(green * ConversionFactor);
89 double Blue() const noexcept
91 return static_cast<double>(blue_) / ConversionFactor;
89 double Blue() const noexcept {
…}
101 if ((blue < 0.0) || (blue > MaxFactor))
104 blue_ =
static_cast<int>(blue * ConversionFactor);
122 static constexpr double MaxFactor = 16.0;
123 static constexpr double ConversionFactor = 256.0;
143 Utilities::SystemInfo::ThrowLastError();
159 Utilities::SystemInfo::ThrowLastError();
Structure that represents an area of interest in the image.
Definition area_2d.hpp:21
The Common Vision Blox image.
Definition decl_image.hpp:45
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:232
void SetGreen(double green)
Sets the white balance factor for the green channel.
Definition white_balance.hpp:76
void ApplyWhiteBalanceFactors(const Image &image, WhiteBalanceFactors factors)
Applies the white balance factors to the given image.
Definition white_balance.hpp:156
double Green() const noexcept
Gets the white balance factor for the geen channel.
Definition white_balance.hpp:66
double Blue() const noexcept
Gets the white balance factor for the blue channel.
Definition white_balance.hpp:89
WhiteBalanceFactors CalculateWhiteBalanceFactors(const Image &image, Area2D aoi)
Calculate the red, green and blue gain factor for white balancing.
Definition white_balance.hpp:137
void SetRed(double red)
Sets the white balance factor for the red channel.
Definition white_balance.hpp:53
WhiteBalanceFactors(double red, double green, double blue)
Initialize a white balance factors structure.
Definition white_balance.hpp:31
void SetBlue(double blue)
Sets the white balance factor for the blue channel.
Definition white_balance.hpp:99
static WhiteBalanceFactors Identity() noexcept
Identity transformation leaving all values as they are.
Definition white_balance.hpp:112
double Red() const noexcept
Gets the white balance factor for the red channel.
Definition white_balance.hpp:43
cvbbool_t CalculateWhiteBalance(IMG Image, TArea Area, double &GainRed, double &GainGreen, double &GainBlue)
cvbbool_t ApplyWhiteBalance(IMG Image, double GainRed, double GainGreen, double GainBlue)
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17