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

Public Member Functions | |
| None | __init__ (self) |
| Initialize a color matrix transformation module with default settings. | |
| None | __del__ (self) |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| bool | enabled (self) |
| Get whether this module is enabled. | |
| None | enabled (self, bool enabled) |
| Enable or disable the module. | |
| np.ndarray | matrix (self) |
| Gets the current color correction matrix. | |
| None | matrix (self, np.ndarray matrix) |
| Sets the current color correction matrix. | |
| float | saturation (self) |
| Gets the current saturation value. | |
| None | saturation (self, float saturation) |
| Sets the current saturation value. | |
| Interval | saturation_range (self) |
| Gets the valid range for saturation. | |
| bool | color_correction_enabled (self) |
| Whether color correction is enabled. | |
| None | color_correction_enabled (self, bool enabled) |
| Whether color correction is enabled. | |
| bool | saturation_enabled (self) |
| Whether saturation is enabled. | |
| None | saturation_enabled (self, bool enabled) |
| Whether saturation is enabled. | |
| Image | process (self, Image input_image) |
| Processes the input image and returns a color corrected and/or saturated output image. | |
| None | reset_to_default (self) |
| Resets all module settings. | |
| None | serialize (self, IArchive archive) |
| Serializes the object's internal state into the provided archive. | |
| None | deserialize (self, IArchive archive) |
| Restores the object's state from the provided archive. | |
Data Fields | |
| enabled | |
| tuple | _auto_feature_module |
Static Public Attributes | |
| np | DEFAULT_MATRIX = np.eye(3) |
| float | DEFAULT_SATURATION = 1.0 |
| list | SUPPORTED_PIXEL_FORMATS |
Protected Member Functions | |
| None | _set_autofeature_module (self, IAutoFeature|None auto_feature_module) |
| None | _apply_matrix (self) |
| None | _apply_saturation (self) |
| np.ndarray | _effective_matrix (self) |
| None | _update_ccm_in_auto_feature_module (self) |
Protected Attributes | |
| bool | _color_correction_enabled = True |
| bool | _saturation_enabled = True |
| None|np.ndarray | _matrix = None |
| float|None | _saturation = None |
| IAutoFeature|None | _auto_feature_module = None |
| _handle = _color_matrix_transformation_handle | |
| np.ndarray | _matrix |
| float | _saturation |
Color matrix transformation is an image pipeline module that applies a color correction matrix to an image.
Provides the features ColorCorrectionFeature and SaturationFeature.
Default configuration:
Definition at line 17 of file color_matrix_transformation_module.py.
| None __init__ | ( | self | ) |
Initialize a color matrix transformation module with default settings.
Reimplemented from ModuleBase.
Definition at line 53 of file color_matrix_transformation_module.py.
| None __del__ | ( | self | ) |
Definition at line 77 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 344 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 356 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 364 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 340 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 372 of file color_matrix_transformation_module.py.
| bool color_correction_enabled | ( | self | ) |
Whether color correction is enabled.
Definition at line 192 of file color_matrix_transformation_module.py.
| None color_correction_enabled | ( | self, | |
| bool | enabled ) |
Whether color correction is enabled.
| enabled | True if color correction is enabled. |
Definition at line 204 of file color_matrix_transformation_module.py.
| None deserialize | ( | self, | |
| IArchive | archive ) |
Restores the object's state from the provided archive.
This function reads and applies all necessary parameters from the given archive to reconstruct the internal state of the object. It ensures that the object is restored to a valid and consistent state.
| archive | The source archive containing the serialized parameters. |
| CorruptedException | If Archive is malformed, misses keys or the values are invalid |
| NotSupportedException | If the 'Version' entry indicates an unsupported version. |
Reimplemented from ModuleBase.
Definition at line 311 of file color_matrix_transformation_module.py.
| bool enabled | ( | self | ) |
Get whether this module is enabled.
When disabled, :func:process returns the input image unchanged.
Reimplemented from ModuleBase.
Definition at line 94 of file color_matrix_transformation_module.py.
| None enabled | ( | self, | |
| bool | enabled ) |
Enable or disable the module.
When disabled, :func:process returns the input image unchanged.
| enabled | True to enable, False to disable. |
Reimplemented from ModuleBase.
Definition at line 108 of file color_matrix_transformation_module.py.
| np.ndarray matrix | ( | self | ) |
Gets the current color correction matrix.
Definition at line 124 of file color_matrix_transformation_module.py.
| None matrix | ( | self, | |
| np.ndarray | matrix ) |
Sets the current color correction matrix.
| matrix | The color correction matrix. |
Definition at line 136 of file color_matrix_transformation_module.py.
Processes the input image and returns a color corrected and/or saturated output image.
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
Images with other formats are passed through unmodified.
This operation disregards any specified image regions and processes the entire image.
| input_image | The input image to be processed. |
Reimplemented from IModule.
Definition at line 242 of file color_matrix_transformation_module.py.
| None reset_to_default | ( | self | ) |
Resets all module settings.
Restores the module configuration to its default values:
Reimplemented from IModule.
Definition at line 272 of file color_matrix_transformation_module.py.
| float saturation | ( | self | ) |
Gets the current saturation value.
Definition at line 150 of file color_matrix_transformation_module.py.
| None saturation | ( | self, | |
| float | saturation ) |
Sets the current saturation value.
| saturation | The saturation value. |
Definition at line 162 of file color_matrix_transformation_module.py.
| bool saturation_enabled | ( | self | ) |
Whether saturation is enabled.
Definition at line 218 of file color_matrix_transformation_module.py.
| None saturation_enabled | ( | self, | |
| bool | enabled ) |
Whether saturation is enabled.
| enabled | True if saturation is enabled. |
Definition at line 230 of file color_matrix_transformation_module.py.
| Interval saturation_range | ( | self | ) |
Gets the valid range for saturation.
Definition at line 176 of file color_matrix_transformation_module.py.
| None serialize | ( | self, | |
| IArchive | archive ) |
Serializes the object's internal state into the provided archive.
This function populates the given archive with all parameters required to fully represent the current state of the object. It ensures that the object can be reconstructed or transmitted accurately by saving all relevant data members in a consistent and structured format.
Reimplemented from ModuleBase.
Definition at line 286 of file color_matrix_transformation_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Reimplemented from IModule.
Definition at line 82 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 66 of file color_matrix_transformation_module.py.
| tuple _auto_feature_module |
Definition at line 373 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 62 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 75 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 64 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 133 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 65 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 159 of file color_matrix_transformation_module.py.
|
protected |
Definition at line 63 of file color_matrix_transformation_module.py.
|
static |
Definition at line 31 of file color_matrix_transformation_module.py.
|
static |
Definition at line 39 of file color_matrix_transformation_module.py.
| enabled |
Definition at line 259 of file color_matrix_transformation_module.py.
|
static |
Definition at line 47 of file color_matrix_transformation_module.py.