IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
UnpackModule Class Reference

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

Inheritance diagram for UnpackModule:

Public Member Functions

 UnpackModule ()
 Creates an instance of class UnpackModule.
 
 ~UnpackModule () override
 
 UnpackModule (const UnpackModule &other)=delete
 Copy constructor for class UnpackModule is deleted.
 
 UnpackModule (UnpackModule &&other) noexcept
 
UnpackModule & operator= (const UnpackModule &other)=delete
 Copy assignment for class UnpackModule is deleted.
 
UnpackModule & operator= (UnpackModule &&other) noexcept
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 This function has no effect on the Unpack module.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 This function has no effect on the unpack module.
 
void SetEnabled (bool enable) override
 This property cannot be changed.
 
bool IsEnabled () const override
 Indicates whether the unpack module is enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
void ResetToDefault () override
 Resets all module settings.
 
void SetTargetBitDepth (size_t bitDepth)
 Set the target bit depth for image processing.
 
size_t GetTargetBitDepth () const
 Get the target bit depth used during image processing.
 
void SetProcessingPolicy (ProcessingPolicy policy)
 Set the processing policy.
 
ProcessingPolicy GetProcessingPolicy () const
 Get the currently configured processing policy.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Converts a packed pixel format image into an unpacked Bayer or monochrome format.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Converts a packed pixel format image into an unpacked Bayer or mono format.
 
void ReleaseBuffers () const
 Frees unused internal buffers.
 

Detailed Description

Unpack is an image pipeline module that converts packed pixel formats into corresponding unpacked Bayer or mono formats.

The unpack module is always enabled and cannot be disabled. It converts input images with packed pixel formats into their corresponding unpacked Bayer or monochrome formats. The output bit depth depends on the applied processing policy and the specified target bit depth.

Default configuration:

  • Target bit depth: 8
  • Processing policy: ProcessingPolicy.Fast
Since
ids_peak_icv 1.0

Definition at line 41 of file peak_icv_unpack_module.hpp.

Constructor & Destructor Documentation

◆ UnpackModule() [1/3]

UnpackModule ( )
inline

Creates an instance of class UnpackModule.

Since
ids_peak_icv 1.0

Definition at line 258 of file peak_icv_unpack_module.hpp.

◆ ~UnpackModule()

~UnpackModule ( )
inlineoverride
Since
ids_peak_icv 1.0

Definition at line 265 of file peak_icv_unpack_module.hpp.

◆ UnpackModule() [2/3]

UnpackModule ( const UnpackModule & other)
delete

Copy constructor for class UnpackModule 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

◆ UnpackModule() [3/3]

UnpackModule ( UnpackModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 273 of file peak_icv_unpack_module.hpp.

Member Function Documentation

◆ Deserialize()

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

This function has no effect on the unpack module.

Since
ids_peak_icv 1.0

Implements ISerializable.

Definition at line 293 of file peak_icv_unpack_module.hpp.

◆ GetProcessingPolicy()

ProcessingPolicy GetProcessingPolicy ( ) const
inline

Get the currently configured processing policy.

Returns
The active processing policy.

Definition at line 459 of file peak_icv_unpack_module.hpp.

◆ GetTargetBitDepth()

size_t GetTargetBitDepth ( ) const
inline

Get the target bit depth used during image processing.

This value specifies the bit depth the module will aim for when unpacking packed pixel formats. The actual output bit depth depends on the selected ProcessingPolicy.

Returns
The currently configured target bit depth.

Definition at line 449 of file peak_icv_unpack_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 308 of file peak_icv_unpack_module.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Indicates whether the unpack module is enabled.

This property always returns true.

Returns
True.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 303 of file peak_icv_unpack_module.hpp.

◆ operator=() [1/2]

UnpackModule & operator= ( const UnpackModule & other)
delete

Copy assignment for class UnpackModule 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]

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

Definition at line 278 of file peak_icv_unpack_module.hpp.

◆ Process() [1/2]

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

Converts a packed pixel format image into an unpacked Bayer or mono format.

This function unpacks the input image from a packed format to its corresponding unpacked Bayer or monochrome format.

Note
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe packed input image to unpack.
Returns
The unpacked output image with the downsampled bit depth.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 482 of file peak_icv_unpack_module.hpp.

◆ Process() [2/2]

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

Converts a packed pixel format image into an unpacked Bayer or monochrome format.

This function unpacks the input image from a packed format to its corresponding unpacked Bayer or monochrome format.

Note
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe packed input image to unpack.
Returns
The unpacked output image with the downsampled bit depth.

Definition at line 464 of file peak_icv_unpack_module.hpp.

◆ ReleaseBuffers()

void ReleaseBuffers ( ) const
inline

Frees unused internal buffers.

This module uses pre-allocated internal buffers to accelerate conversions. When the image size or pixel format changes, new buffers are allocated, which may cause the internal buffer pool to grow over time. This function can be used to release unused buffers and reduce memory usage.

Note
Avoid calling this function too frequently (e.g., after every resize or format change), as it introduces some overhead.
Since
ids_peak_icv 1.0

Definition at line 507 of file peak_icv_unpack_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets all module settings.

Resets the target bit depth to 8 and the processing policy to ProcessingPolicy::Fast

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

Implements IModule.

Definition at line 438 of file peak_icv_unpack_module.hpp.

◆ Serialize()

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

This function has no effect on the Unpack module.

Since
ids_peak_icv 1.0

Implements ISerializable.

Definition at line 288 of file peak_icv_unpack_module.hpp.

◆ SetEnabled()

void SetEnabled ( bool enable)
inlineoverridevirtual

This property cannot be changed.

The module remains enabled to guarantee correct operation of following modules.

Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 298 of file peak_icv_unpack_module.hpp.

◆ SetProcessingPolicy()

void SetProcessingPolicy ( ProcessingPolicy policy)
inline

Set the processing policy.

Defines how the bit depth is handled during image processing — whether it is increased, decreased, or preserved.

Parameters
policyThe desired processing policy.

Definition at line 454 of file peak_icv_unpack_module.hpp.

◆ SetTargetBitDepth()

void SetTargetBitDepth ( size_t bitDepth)
inline

Set the target bit depth for image processing.

The target bit depth acts as a reference when deciding how to unpack packed pixel formats. The actual resulting bit depth depends on the selected ProcessingPolicy:

  • Fast: The output bit depth is the minimum of the input image bit depth and the target bit depth.
  • Balanced: The output bit depth is the same as the input image bit depth (the target value is ignored).
  • Enhanced: The output bit depth is the maximum of the input image bit depth and the target bit depth.

This allows you to downsample, preserve, or enhance bit depth depending on your use case.

Parameters
bitDepthThe desired target bit depth (e.g., 8, 10, 12).
Since
ids_peak_icv 1.0

Definition at line 444 of file peak_icv_unpack_module.hpp.