
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:
| None __init__ | ( | self | ) |
| None __del__ | ( | self | ) |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
| None deserialize | ( | self, | |
| IArchive | archive ) |
This function has no effect on the Unpack module.
Reimplemented from ModuleBase.
| bool enabled | ( | self | ) |
Indicates whether the unpack module is enabled.
This property always returns True. Setting this property has no effect.
Reimplemented from ModuleBase.
| None enabled | ( | self, | |
| bool | enabled ) |
This property cannot be changed.
The module remains enabled to guarantee correct operation of following modules.
Reimplemented from ModuleBase.
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. |
| ProcessingPolicy processing_policy | ( | self | ) |
Get the currently configured processing policy.
| None processing_policy | ( | self, | |
| ProcessingPolicy | policy ) |
| 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.
| None reset_to_default | ( | self | ) |
Resets all settings to their defaults.
Default configuration:
| None serialize | ( | self, | |
| IArchive | archive ) |
This function has no effect on the Unpack module.
Reimplemented from ModuleBase.
| 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.
| 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). |
| str type | ( | self | ) |
|
protected |
|
protected |
|
protected |
|
static |
|
static |