![]() |
IDS peak ICV v1.1.0
|

Public Member Functions | |
| None | __init__ (self) |
| Creates an instance of the debayer module. | |
| None | __del__ (self) |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| DebayerChannelLayout | channel_layout (self) |
| Get the output channel layout used for debayered images. | |
| None | channel_layout (self, DebayerChannelLayout layout) |
| Set the output channel layout for debayered images. | |
| DebayerConversionPolicy | conversion_policy (self) |
| Get the conversion policy. | |
| None | conversion_policy (self, DebayerConversionPolicy policy) |
| Set the debayer conversion policy. | |
| int | target_bit_depth (self) |
| Get the target bit depth for processed images. | |
| None | target_bit_depth (self, int bit_depth) |
| Set the target bit depth for processed images. | |
| ProcessingPolicy | processing_policy (self) |
| Get the processing policy. | |
| None | processing_policy (self, ProcessingPolicy policy) |
| Set the processing policy. | |
| Image | process (self, Image input_image) |
| Processes the input image by applying debayering (if enabled). | |
| None | reset_to_default (self) |
| Resets all module settings. | |
| None | release_buffers (self) |
| Frees unused internal buffers. | |
| 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. | |
Protected Member Functions | |
| int | _get_output_bit_depth (self, int input_bit_depth) |
| PixelFormat | _get_output_format (self, PixelFormat input_pixel_format) |
Protected Attributes | |
| _handle = image_converter_handle | |
| DebayerChannelLayout | _channel_layout = self.DEFAULT_CHANNEL_LAYOUT |
| DebayerConversionPolicy | _conversion_policy = self.DEFAULT_CONVERSION_POLICY |
| int | _target_bit_depth = self.DEFAULT_TARGET_BIT_DEPTH |
| ProcessingPolicy | _policy = self.DEFAULT_POLICY |
| _enabled | |
Debayer is an image pipeline module that converts Bayer RAW images into standard color formats.
It performs demosaicing on Bayer-pattern RAW images, converting them into full-color images using configurable channel layouts such as RGB, BGR, RGBA, or BGRA. The bit depth of the output is inferred from the input, depending on the selected processing policy.
Default configuration:
Definition at line 16 of file debayer_module.py.
| None __init__ | ( | self | ) |
Creates an instance of the debayer module.
Reimplemented from ModuleBase.
Definition at line 41 of file debayer_module.py.
| None __del__ | ( | self | ) |
Definition at line 61 of file debayer_module.py.
|
protected |
Definition at line 290 of file debayer_module.py.
|
protected |
Definition at line 297 of file debayer_module.py.
| DebayerChannelLayout channel_layout | ( | self | ) |
Get the output channel layout used for debayered images.
Definition at line 76 of file debayer_module.py.
| None channel_layout | ( | self, | |
| DebayerChannelLayout | layout ) |
Set the output channel layout for debayered images.
This controls the order and number of color channels in the converted image. The bit depth is automatically inherited from the input Bayer image.
| layout | Desired channel layout |
Definition at line 87 of file debayer_module.py.
| DebayerConversionPolicy conversion_policy | ( | self | ) |
Get the conversion policy.
Definition at line 101 of file debayer_module.py.
| None conversion_policy | ( | self, | |
| DebayerConversionPolicy | policy ) |
Set the debayer conversion policy.
This policy determines which types of input images will be converted. All other image types are passed through unchanged.
| policy | Desired conversion policy. |
Definition at line 111 of file debayer_module.py.
| 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.
| archive | The source archive containing the serialized parameters. |
| CorruptedException | If Archive is malformed, misses keys or the values are invalid |
| NotSupportedException | If the 'Version' entry indicates an unsupported version. |
Reimplemented from ModuleBase.
Definition at line 265 of file debayer_module.py.
Processes the input image by applying debayering (if enabled).
| input_image | Input image to be processed. |
Reimplemented from IModule.
Definition at line 175 of file debayer_module.py.
| ProcessingPolicy processing_policy | ( | self | ) |
Get the processing policy.
Definition at line 152 of file debayer_module.py.
| None processing_policy | ( | self, | |
| ProcessingPolicy | policy ) |
Set the processing policy.
The processing policy defines how the target bit depth interacts with the input image bit depth.
| policy | Desired ProcessingPolicy. |
Definition at line 162 of file debayer_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.
Avoid calling this function too frequently (e.g., after every resize or format change), as it introduces some overhead.
Definition at line 226 of file debayer_module.py.
| None reset_to_default | ( | self | ) |
Resets all module settings.
Restores the module configuration to its default values:
Reimplemented from IModule.
Definition at line 208 of file debayer_module.py.
| 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.
Reimplemented from ModuleBase.
Definition at line 248 of file debayer_module.py.
| int target_bit_depth | ( | self | ) |
Get the target bit depth for processed images.
Definition at line 125 of file debayer_module.py.
| None target_bit_depth | ( | self, | |
| int | bit_depth ) |
Set the target bit depth for processed images.
The effective output bit depth depends on the selected :class:ProcessingPolicy:
| bit_depth | Desired target bit depth (e.g., 8, 10, 12). |
Definition at line 135 of file debayer_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Reimplemented from IModule.
Definition at line 66 of file debayer_module.py.
|
protected |
Definition at line 56 of file debayer_module.py.
|
protected |
Definition at line 57 of file debayer_module.py.
|
protected |
Definition at line 189 of file debayer_module.py.
|
protected |
Definition at line 55 of file debayer_module.py.
|
protected |
Definition at line 59 of file debayer_module.py.
|
protected |
Definition at line 58 of file debayer_module.py.
|
static |
Definition at line 36 of file debayer_module.py.
|
static |
Definition at line 37 of file debayer_module.py.
|
static |
Definition at line 39 of file debayer_module.py.
|
static |
Definition at line 38 of file debayer_module.py.