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

Public Member Functions | |
| None | __init__ (self) |
| Initializes a MonoConversionModule with default settings. | |
| None | __del__ (self) |
| str | type (self) |
| Returns the type of the module (used for serialization or UI). | |
| None | reset_to_default (self) |
| Does nothing. | |
| Image | process (self, Image input_image) |
| Converts the input image to the configured output pixel format. | |
| None | release_buffers (self) |
| Frees unused internal buffers. | |
Data Fields | |
| enabled | |
Static Protected Member Functions | |
| PixelFormat | _get_output_format (PixelFormat input_pixel_format) |
Protected Attributes | |
| _handle = image_converter_handle | |
Mono conversion is an image pipeline module that converts images to a monochrome format.
The mono conversion module performs a mono (grayscale) conversion on input images. When enabled, it converts the input image to a mono format while preserving the input bit depth. If disabled, the input image is passed through unchanged.
Definition at line 11 of file mono_conversion_module.py.
| None __init__ | ( | self | ) |
Initializes a MonoConversionModule with default settings.
Reimplemented from ModuleBase.
Definition at line 22 of file mono_conversion_module.py.
| None __del__ | ( | self | ) |
Definition at line 37 of file mono_conversion_module.py.
|
staticprotected |
Definition at line 113 of file mono_conversion_module.py.
Converts the input image to the configured output pixel format.
This operation disregards any specified image regions and processes the full image.
| input_image | The input image to convert. |
Reimplemented from IModule.
Definition at line 62 of file mono_conversion_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 91 of file mono_conversion_module.py.
| None reset_to_default | ( | self | ) |
Does nothing.
Reimplemented from IModule.
Definition at line 53 of file mono_conversion_module.py.
| str type | ( | self | ) |
Returns the type of the module (used for serialization or UI).
Reimplemented from IModule.
Definition at line 42 of file mono_conversion_module.py.
|
protected |
Definition at line 35 of file mono_conversion_module.py.
| enabled |
Definition at line 75 of file mono_conversion_module.py.