
Public Member Functions | |
| GainFeature (GainModule module) | |
| Creates a GainFeature for an existing gain module. | |
| void | ResetToDefault () |
| Resets the gain values to their defaults. | |
Properties | |
| float | Master [get, set] |
| The current master gain value. | |
| float | Red [get, set] |
| The current red gain value. | |
| float | Green [get, set] |
| The current green gain value. | |
| float | Blue [get, set] |
| The current blue gain value. | |
| IntervalF | Range [get] |
| Retrieves the valid range for the master or color gains. | |
| bool | IsEnabled [get, set] |
| Enables or disables the feature. | |
The GainFeature applies gain to the image.
Gain is used to adjust pixel intensities either uniformly across all color channels using the master gain, or individually per channel using the red, green, and blue gains. With master gain, image brightness can be increased. With color gains, the white balance can be adjusted.
For color images, gain is applied as follows:
where red_value_in, green_value_in, and blue_value_in are the input red, green, and blue channel values, respectively, and red_value_out, green_value_out, and blue_value_out are the corresponding output values.
All RGB values are normalized to the range [0.0, 1.0].
For mono images, the color gains are ignored and applied as follows:
where gray_value_in is the input and gray_value_out the output value, normalized to the range [0.0, 1.0].
Definition at line 54 of file GainFeature.cs.
|
inline |
Creates a GainFeature for an existing gain module.
| module | Reference to the underlying GainModule. |
Definition at line 64 of file GainFeature.cs.
|
inline |
Resets the gain values to their defaults.
Implements IFeature.
Definition at line 156 of file GainFeature.cs.
|
getset |
The current blue gain value.
Sets the color gain for the blue channel. The valid range for the gain value can be obtained using the Range property.
| IcvOutOfRangeException | The gain value is outside the valid range. |
Definition at line 127 of file GainFeature.cs.
|
getset |
The current green gain value.
Sets the color gain for the green channel. The valid range for the gain value can be obtained using the Range property.
| IcvOutOfRangeException | The gain value is outside the valid range. |
Definition at line 111 of file GainFeature.cs.
|
getset |
Enables or disables the feature.
Implements IFeature.
Definition at line 143 of file GainFeature.cs.
|
getset |
The current master gain value.
Sets the overall master gain. The valid range for the gain value can be obtained using the Range property.
| IcvOutOfRangeException | The gain value is outside the valid range. |
Definition at line 79 of file GainFeature.cs.
|
getset |
The current red gain value.
Sets the color gain for the red channel. The valid range for the gain value can be obtained using the Range property.
| IcvOutOfRangeException | The gain value is outside the valid range. |
Definition at line 95 of file GainFeature.cs.