
Public Member Functions | |
| None | __init__ (self) |
| Creates an instance of the sharpening module. | |
| None | __del__ (self) |
| 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. | |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| None | reset_to_default (self) |
| Resets the sharpness level to its default value (0). | |
| int | level (self) |
| Gets the current sharpness level. | |
| None | level (self, int level) |
| Sets the sharpness level. | |
| Interval | level_range (self) |
| Gets the valid range of sharpening level values. | |
| Image | process (self, Image input_image) |
| Apply sharpening to the specified image. | |
Data Fields | |
| int | level |
Static Public Attributes | |
| list | SUPPORTED_PIXEL_FORMATS |
| int | DEFAULT_LEVEL = 0 |
Protected Attributes | |
| int | _level = self.DEFAULT_LEVEL |
Static Protected Attributes | |
| str | _level_key = "Level" |
Sharpening is an image pipeline module that applies a sharpening filter to enhance image detail.
Definition at line 12 of file sharpening_module.py.
| None __init__ | ( | self | ) |
Creates an instance of the sharpening module.
Reimplemented from ModuleBase.
Definition at line 31 of file sharpening_module.py.
| None __del__ | ( | self | ) |
Definition at line 42 of file sharpening_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 61 of file sharpening_module.py.
| int level | ( | self | ) |
Gets the current sharpness level.
Definition at line 106 of file sharpening_module.py.
| None level | ( | self, | |
| int | level ) |
Sets the sharpness level.
| level | An integer specifying the sharpening strength. |
| OutOfRangeException | The specified level is outside the valid range. |
Definition at line 118 of file sharpening_module.py.
| Interval level_range | ( | self | ) |
Gets the valid range of sharpening level values.
Definition at line 134 of file sharpening_module.py.
| Image process | ( | self, | |
| Image | input_image ) |
Apply sharpening to the specified image.
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
If sharpening is disabled or the sharpening level is set to 0, the input image is returned unchanged. Otherwise, this method applies an in-place sharpening operation using the configured level.
| input_image | Input image to be processed. |
Definition at line 152 of file sharpening_module.py.
| None reset_to_default | ( | self | ) |
Resets the sharpness level to its default value (0).
Definition at line 94 of file sharpening_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.
| archive | The target archive that will store the serialized parameters. |
Reimplemented from ModuleBase.
Definition at line 45 of file sharpening_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Definition at line 83 of file sharpening_module.py.
|
protected |
Definition at line 40 of file sharpening_module.py.
|
staticprotected |
Definition at line 29 of file sharpening_module.py.
|
static |
Definition at line 27 of file sharpening_module.py.
| level |
Definition at line 59 of file sharpening_module.py.
|
static |
Definition at line 21 of file sharpening_module.py.