IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
SharpeningModule Class Reference

#include <peak_icv/pipeline/detail/peak_icv_sharpening_module.hpp>

Inheritance diagram for SharpeningModule:

Public Member Functions

 SharpeningModule ()=default
 Creates an instance of class SharpeningModule with default values.
 
 ~SharpeningModule () override=default
 
 SharpeningModule (const SharpeningModule &other)=delete
 Copy constructor for class SharpeningModule is deleted.
 
 SharpeningModule (SharpeningModule &&other) noexcept
 
SharpeningModule & operator= (const SharpeningModule &other)=delete
 Copy assignment for class SharpeningModule is deleted.
 
SharpeningModule & operator= (SharpeningModule &&other) noexcept
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the object's internal state into the provided archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Restores the object's state from the provided archive.
 
void SetEnabled (bool enabled) override
 Sets the enabled state of this module.
 
bool IsEnabled () const override
 Checks if the module is currently enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
void ResetToDefault () override
 Resets the sharpness level to the default value.
 
void SetLevel (uint32_t level)
 Sets the sharpness level.
 
uint32_t GetLevel () const
 Retrieves the current sharpness level.
 
peak::common::IntervalU GetLevelRange () const
 Returns the valid range of sharpness levels.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Processes the input image and returns a sharpened output image.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Processes the input image and returns a sharpened output image.
 

Detailed Description

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

It enhances edges and fine structures by emphasizing high-frequency components in the image.

The strength of the effect is controlled by the sharpness level, where 0 results in no change.

Warning
Increasing the sharpness level can also amplify image noise, especially at higher values. Excessive sharpening may introduce artifacts such as halos around edges.

Defaults
  • level = 0
See also
features::GammaFeature
Since
ids_peak_icv 1.0

Definition at line 33 of file peak_icv_sharpening_module.hpp.

Constructor & Destructor Documentation

◆ SharpeningModule() [1/3]

SharpeningModule ( )
default

Creates an instance of class SharpeningModule with default values.

Since
ids_peak_icv 1.0

◆ ~SharpeningModule()

~SharpeningModule ( )
overridedefault
Since
ids_peak_icv 1.0

◆ SharpeningModule() [2/3]

SharpeningModule ( const SharpeningModule & other)
delete

Copy constructor for class SharpeningModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ SharpeningModule() [3/3]

SharpeningModule ( SharpeningModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 225 of file peak_icv_sharpening_module.hpp.

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

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

Implements ISerializable.

Definition at line 248 of file peak_icv_sharpening_module.hpp.

◆ GetLevel()

uint32_t GetLevel ( ) const
inline

Retrieves the current sharpness level.

Returns
The currently configured sharpness level.
Since
ids_peak_icv 1.0

Definition at line 288 of file peak_icv_sharpening_module.hpp.

◆ GetLevelRange()

peak::common::IntervalU GetLevelRange ( ) const
inline

Returns the valid range of sharpness levels.

Returns
An IntervalU containing the minimum and maximum allowed sharpness level values.
Since
ids_peak_icv 1.0

Definition at line 293 of file peak_icv_sharpening_module.hpp.

◆ GetType()

const char * GetType ( ) const
inlineoverridevirtual

Returns the type of the module for serialization purposes.

Returns
A string representing the module's type.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 268 of file peak_icv_sharpening_module.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Checks if the module is currently enabled.

Returns
True if the module is enabled, false otherwise.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 263 of file peak_icv_sharpening_module.hpp.

◆ operator=() [1/2]

SharpeningModule & operator= ( const SharpeningModule & other)
delete

Copy assignment for class SharpeningModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ operator=() [2/2]

SharpeningModule & operator= ( SharpeningModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 230 of file peak_icv_sharpening_module.hpp.

◆ Process() [1/2]

peak::common::Any Process ( const peak::common::Any & input) const
inlineoverridevirtual

Processes the input image and returns a sharpened output image.

Note
Supported pixel formats: Mono8, Mono10, Mono12, RGB8, RGB10, RGB12, BGR8, BGR10, BGR12, RGBa8, RGBa10, RGBa12, BGRa8, BGRa10, BGRa12. Images with other formats are passed through unmodified.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image with sharpening applied.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 308 of file peak_icv_sharpening_module.hpp.

◆ Process() [2/2]

peak::icv::Image Process ( const peak::icv::Image & input) const
inline

Processes the input image and returns a sharpened output image.

Note
Supported pixel formats: Mono8, Mono10, Mono12, RGB8, RGB10, RGB12, BGR8, BGR10, BGR12, RGBa8, RGBa10, RGBa12, BGRa8, BGRa10, BGRa12. Images with other formats are passed through unmodified.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image with sharpening applied.
Since
ids_peak_icv 1.0

Definition at line 303 of file peak_icv_sharpening_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets the sharpness level to the default value.

Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 273 of file peak_icv_sharpening_module.hpp.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

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

Implements ISerializable.

Definition at line 240 of file peak_icv_sharpening_module.hpp.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Sets the enabled state of this module.

Parameters
enabledIf true, the module is enabled; otherwise, it is disabled.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 258 of file peak_icv_sharpening_module.hpp.

◆ SetLevel()

void SetLevel ( uint32_t level)
inline

Sets the sharpness level.

Note
Higher sharpness levels may increase noise in the output image.
The sharpness level must be within the valid range returned by GetLevelRange.
Parameters
levelThe sharpness level.
Exceptions
OutOfRangeExceptionIf level is outside the valid range.
Since
ids_peak_icv 1.0

Definition at line 278 of file peak_icv_sharpening_module.hpp.