![]() |
IDS peak ICV v1.1.0
|

Public Member Functions | |
| None | __init__ (self) |
| Creates an instance of the gain module. | |
| None | __del__ (self) |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| None | reset_to_default (self) |
| Resets all gain values to defaults. | |
| float | master (self) |
| Returns the current master gain value. | |
| None | master (self, float value) |
| Sets the master gain. | |
| float | red (self) |
| Returns the current red gain value. | |
| None | red (self, float value) |
| Sets the red channel gain. | |
| float | green (self) |
| Returns the current green gain value. | |
| None | green (self, float value) |
| Sets the green channel gain. | |
| float | blue (self) |
| Returns the current blue gain value. | |
| None | blue (self, float value) |
| Sets the blue channel gain. | |
| Interval | range (self) |
| Returns the valid range for all gain values. | |
| Image | process (self, Image input_image) |
| Processes the input image by applying gain correction (if enabled). | |
| None | serialize (self, IArchive archive) |
| Serializes the module’s internal state into an archive. | |
| None | deserialize (self, IArchive archive) |
| Restores the module’s state from an archive. | |
Data Fields | |
| master | |
| red | |
| green | |
| blue | |
Static Public Attributes | |
| float | DEFAULT_MASTER = 1.0 |
| float | DEFAULT_RED = 1.0 |
| float | DEFAULT_GREEN = 1.0 |
| float | DEFAULT_BLUE = 1.0 |
| list | SUPPORTED_PIXEL_FORMATS |
Protected Member Functions | |
| None | _apply (self, _GainType gain_type, float value) |
| float | _fetch (self, _GainType gain_type) |
Protected Attributes | |
| float | _master = self.DEFAULT_MASTER |
| float | _red = self.DEFAULT_RED |
| float | _green = self.DEFAULT_GREEN |
| float | _blue = self.DEFAULT_BLUE |
| _handle = ctypes.c_void_p() | |
| _enabled | |
Gain is an image pipeline module that applies gain correction to an image.
This module adjusts the intensity or color gain of an image by modifying the master and per-channel (R, G, B) gain factors. It can be used to correct image brightness or color balance after acquisition.
The gain correction is applied independently to each channel, and is typically used as part of the early preprocessing stages of an image pipeline.
Default configuration:
Definition at line 21 of file gain_module.py.
| None __init__ | ( | self | ) |
Creates an instance of the gain module.
Reimplemented from ModuleBase.
Definition at line 81 of file gain_module.py.
| None __del__ | ( | self | ) |
Definition at line 100 of file gain_module.py.
|
protected |
Definition at line 294 of file gain_module.py.
|
protected |
Definition at line 302 of file gain_module.py.
| float blue | ( | self | ) |
Returns the current blue gain value.
Reimplemented from IGain.
Definition at line 197 of file gain_module.py.
| None blue | ( | self, | |
| float | value ) |
Sets the blue channel gain.
| value | Gain value within valid range. |
Reimplemented from IGain.
Definition at line 206 of file gain_module.py.
| None deserialize | ( | self, | |
| IArchive | archive ) |
Restores the module’s state from an archive.
| archive | Archive containing the serialized state. |
| CorruptedException | If the archive is malformed. |
| NotSupportedException | If version is unsupported. |
Reimplemented from ModuleBase.
Definition at line 276 of file gain_module.py.
| float green | ( | self | ) |
Returns the current green gain value.
Reimplemented from IGain.
Definition at line 176 of file gain_module.py.
| None green | ( | self, | |
| float | value ) |
Sets the green channel gain.
| value | Gain value within valid range. |
Reimplemented from IGain.
Definition at line 185 of file gain_module.py.
| float master | ( | self | ) |
Returns the current master gain value.
Reimplemented from IGain.
Definition at line 133 of file gain_module.py.
| None master | ( | self, | |
| float | value ) |
Sets the master gain.
| value | Gain value within the valid range returned by :py:meth:range. |
| OutOfRangeException | If value is outside the valid range. |
Reimplemented from IGain.
Definition at line 142 of file gain_module.py.
Processes the input image by applying gain correction (if enabled).
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
| input_image | Input image to be processed. |
Reimplemented from IModule.
Definition at line 237 of file gain_module.py.
| Interval range | ( | self | ) |
Returns the valid range for all gain values.
The range applies to master and per-channel gains.
Definition at line 218 of file gain_module.py.
| float red | ( | self | ) |
Returns the current red gain value.
Reimplemented from IGain.
Definition at line 155 of file gain_module.py.
| None red | ( | self, | |
| float | value ) |
Sets the red channel gain.
| value | Gain value within valid range. |
Reimplemented from IGain.
Definition at line 164 of file gain_module.py.
| None reset_to_default | ( | self | ) |
Resets all gain values to defaults.
Master, Red, Green, and Blue gains are all reset to 1.0.
Reimplemented from IModule.
Definition at line 114 of file gain_module.py.
| None serialize | ( | self, | |
| IArchive | archive ) |
Serializes the module’s internal state into an archive.
Reimplemented from ModuleBase.
Definition at line 262 of file gain_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Reimplemented from IModule.
Definition at line 105 of file gain_module.py.
|
protected |
Definition at line 92 of file gain_module.py.
|
protected |
Definition at line 248 of file gain_module.py.
|
protected |
Definition at line 91 of file gain_module.py.
|
protected |
Definition at line 94 of file gain_module.py.
|
protected |
Definition at line 89 of file gain_module.py.
|
protected |
Definition at line 90 of file gain_module.py.
| blue |
Definition at line 274 of file gain_module.py.
|
static |
Definition at line 67 of file gain_module.py.
|
static |
Definition at line 59 of file gain_module.py.
|
static |
Definition at line 43 of file gain_module.py.
|
static |
Definition at line 51 of file gain_module.py.
| green |
Definition at line 273 of file gain_module.py.
| master |
Definition at line 271 of file gain_module.py.
| red |
Definition at line 272 of file gain_module.py.
|
static |
Definition at line 75 of file gain_module.py.