
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.
| None __init__ | ( | self | ) |
| None __del__ | ( | self | ) |
| 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.
| int level | ( | self | ) |
| 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. |
| Interval level_range | ( | self | ) |
Gets the valid range of sharpening level values.
| 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. |
| None reset_to_default | ( | self | ) |
Resets the sharpness level to its default value (0).
| 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.
| str type | ( | self | ) |
|
protected |
|
staticprotected |
|
static |
| level |
|
static |