
Public Member Functions | |
| None | __init__ (self) |
| Creates an instance of class UnpackModule. | |
| None | __del__ (self) |
| int | target_bit_depth (self) |
| Get the target bit depth used during image processing. | |
| None | target_bit_depth (self, int bit_depth) |
| Set the target bit depth for image processing. | |
| ProcessingPolicy | processing_policy (self) |
| Get the currently configured processing policy. | |
| None | processing_policy (self, ProcessingPolicy policy) |
| Set the processing policy. | |
| bool | enabled (self) |
| Indicates whether the unpack module is enabled. | |
| None | enabled (self, bool enabled) |
| This property cannot be changed. | |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| Image | process (self, Image input_image) |
| Converts a packed pixel format image into an unpacked Bayer or monochrome format. | |
| None | reset_to_default (self) |
| Resets all settings to their defaults. | |
| None | release_buffers (self) |
| Frees unused internal buffers. | |
| None | serialize (self, IArchive archive) |
| This function has no effect on the Unpack module. | |
| None | deserialize (self, IArchive archive) |
| This function has no effect on the Unpack module. | |
Static Public Attributes | |
| DEFAULT_POLICY = ProcessingPolicy.FAST | |
| int | DEFAULT_TARGET_BIT_DEPTH = 8 |
Protected Member Functions | |
| int | _get_output_bit_depth (self, int input_bit_depth) |
| PixelFormat | _get_output_pixel_format (self, PixelFormat input_pixel_format, int output_bit_depth) |
Static Protected Member Functions | |
| PixelFormat | _bayer_bg_format (int bit_depth) |
| PixelFormat | _bayer_gb_format (int bit_depth) |
| PixelFormat | _bayer_gr_format (int bit_depth) |
| PixelFormat | _bayer_rg_format (int bit_depth) |
| PixelFormat | _mono_format (int bit_depth) |
Protected Attributes | |
| _handle = image_converter_handle | |
| int | _target_bit_depth = self.DEFAULT_TARGET_BIT_DEPTH |
| ProcessingPolicy | _policy = self.DEFAULT_POLICY |
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:
Definition at line 13 of file unpack_module.py.
| None __init__ | ( | self | ) |
Creates an instance of class UnpackModule.
Reimplemented from ModuleBase.
Definition at line 33 of file unpack_module.py.
| None __del__ | ( | self | ) |
Definition at line 49 of file unpack_module.py.
|
staticprotected |
Definition at line 315 of file unpack_module.py.
|
staticprotected |
Definition at line 323 of file unpack_module.py.
|
staticprotected |
Definition at line 331 of file unpack_module.py.
|
staticprotected |
Definition at line 339 of file unpack_module.py.
|
protected |
Definition at line 244 of file unpack_module.py.
|
protected |
Definition at line 251 of file unpack_module.py.
|
staticprotected |
Definition at line 347 of file unpack_module.py.
| None deserialize | ( | self, | |
| IArchive | archive ) |
This function has no effect on the Unpack module.
Reimplemented from ModuleBase.
Definition at line 232 of file unpack_module.py.
| bool enabled | ( | self | ) |
Indicates whether the unpack module is enabled.
This property always returns True. Setting this property has no effect.
Reimplemented from ModuleBase.
Definition at line 118 of file unpack_module.py.
| None enabled | ( | self, | |
| bool | enabled ) |
This property cannot be changed.
The module remains enabled to guarantee correct operation of following modules.
Reimplemented from ModuleBase.
Definition at line 131 of file unpack_module.py.
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.
| input_image | The packed input image to unpack. |
Definition at line 154 of file unpack_module.py.
| ProcessingPolicy processing_policy | ( | self | ) |
Get the currently configured processing policy.
Definition at line 96 of file unpack_module.py.
| None processing_policy | ( | self, | |
| ProcessingPolicy | policy ) |
Set the processing policy.
| policy | The desired processing policy. |
Definition at line 107 of file unpack_module.py.
| None release_buffers | ( | self | ) |
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.
Definition at line 202 of file unpack_module.py.
| None reset_to_default | ( | self | ) |
Resets all settings to their defaults.
Default configuration:
Definition at line 186 of file unpack_module.py.
| None serialize | ( | self, | |
| IArchive | archive ) |
This function has no effect on the Unpack module.
Reimplemented from ModuleBase.
Definition at line 221 of file unpack_module.py.
| int target_bit_depth | ( | self | ) |
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 :class:ProcessingPolicy.
Definition at line 54 of file unpack_module.py.
| None target_bit_depth | ( | self, | |
| int | bit_depth ) |
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 :class:ProcessingPolicy:
This allows you to downsample, preserve, or enhance bit depth depending on your use case.
| bit_depth | The desired target bit depth (e.g., 8, 10, 12). |
Definition at line 70 of file unpack_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Definition at line 143 of file unpack_module.py.
|
protected |
Definition at line 45 of file unpack_module.py.
|
protected |
Definition at line 47 of file unpack_module.py.
|
protected |
Definition at line 46 of file unpack_module.py.
|
static |
Definition at line 30 of file unpack_module.py.
|
static |
Definition at line 31 of file unpack_module.py.