IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
SharpeningModule Class Reference
Inheritance diagram for SharpeningModule:

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"
 

Detailed Description

Sharpening is an image pipeline module that applies a sharpening filter to enhance image detail.

Since
ids_peak_common 1.1

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self)

Creates an instance of the sharpening module.

Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ __del__()

None __del__ ( self)

Member Function Documentation

◆ deserialize()

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.

Parameters
archiveThe source archive containing the serialized parameters.
Exceptions
CorruptedExceptionIf Archive is malformed, misses keys or the values are invalid
NotSupportedExceptionIf the 'Version' entry indicates an unsupported version.
Note
This function requires that the archive contains all expected fields as produced by a corresponding serialize() call.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ level() [1/2]

int level ( self)

Gets the current sharpness level.

Returns
Integer level.
Since
ids_peak_icv 1.0

◆ level() [2/2]

None level ( self,
int level )

Sets the sharpness level.

Parameters
levelAn integer specifying the sharpening strength.
Exceptions
OutOfRangeExceptionThe specified level is outside the valid range.
Since
ids_peak_icv 1.0

◆ level_range()

Interval level_range ( self)

Gets the valid range of sharpening level values.

Returns
IntervalU with min and max values.
Since
ids_peak_icv 1.0

◆ process()

Image process ( self,
Image input_image )

Apply sharpening to the specified image.

Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • BGR8
  • BGRa8
  • RGB8
  • RGBa8
  • BGR10
  • BGRa10
  • RGB10
  • RGBa10
  • BGR12
  • BGRa12
  • RGB12
  • RGBa12

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.

Parameters
input_imageInput image to be processed.
Returns
Processed output image.
Since
ids_peak_icv 1.0

◆ reset_to_default()

None reset_to_default ( self)

Resets the sharpness level to its default value (0).

Note
The enabled state does not change when calling this function.
Since
ids_peak_icv 1.0

◆ serialize()

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.

Parameters
archiveThe target archive that will store the serialized parameters.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ type()

str type ( self)

Returns the type of the module for serialization purposes.

Returns
Module type
Since
ids_peak_icv 1.0

Field Documentation

◆ _level

int _level = self.DEFAULT_LEVEL
protected

◆ _level_key

_level_key = "Level"
staticprotected

◆ DEFAULT_LEVEL

int DEFAULT_LEVEL = 0
static

◆ level

level

◆ SUPPORTED_PIXEL_FORMATS

SUPPORTED_PIXEL_FORMATS
static
Initial value:
= [PixelFormat.MONO_8, PixelFormat.MONO_10, PixelFormat.MONO_12,
PixelFormat.RGB_8, PixelFormat.RGB_10, PixelFormat.RGB_12,
PixelFormat.RGBA_8, PixelFormat.RGBA_10, PixelFormat.RGBA_12,
PixelFormat.BGR_8, PixelFormat.BGR_10, PixelFormat.BGR_12,
PixelFormat.BGRA_8, PixelFormat.BGRA_10, PixelFormat.BGRA_12]