
Public Member Functions | |
| None | __init__ (self) |
| Initializes all internal modules to their default configuration. | |
| int | version (self) |
| The pipeline version as an integer. | |
| str | type (self) |
| The pipeline type identifier as a string, primarily used for serialization. | |
| Image | process (self, Union[Image, IImageView] image) |
| Applies the pipeline to the given image and returns the result as a new image. | |
| str | export_settings_to_string (self) |
| Converts the current pipeline settings into a string format. | |
| None | import_settings_from_string (self, str settings) |
| Restores pipeline settings from a previously serialized string. | |
| None | reset_to_default (self) |
| Resets all modules in the pipeline to their default state. | |
| ProcessingPolicy | processing_policy (self) |
| The currently used processing policy. | |
| None | processing_policy (self, ProcessingPolicy policy) |
| Defines the processing policy for the pipeline. | |
| PixelFormat | output_pixel_format (self) |
The current output pixel format as a PixelFormat enum. | |
| None | output_pixel_format (self, PixelFormat output_pixel_format) |
| Defines the desired pixel format for processed images. | |
| MirrorFeature | mirror (self) |
| Provides access to the mirror feature for image mirroring operations. | |
| RotationFeature | rotation (self) |
| Provides access to the rotation feature for image rotation operations. | |
| GainFeature | gain (self) |
| Provides access to the gain feature for brightness and white balance adjustments. | |
| ColorCorrectionFeature | color_correction (self) |
| Provides access to the color correction feature for color space transformations. | |
| SaturationFeature | saturation (self) |
| Provides access to the saturation feature for color intensity adjustments. | |
| GammaFeature | gamma (self) |
| Provides access to the gamma feature for brightness and contrast adjustments. | |
| DigitalBlackFeature | digital_black (self) |
| Provides access to the digital black feature for sensor offset correction. | |
| SharpeningFeature | sharpening (self) |
| Provides access to the sharpening feature for image detail enhancement. | |
| HotpixelCorrectionFeature | hotpixel_correction (self) |
| Provides access to the hot pixel correction feature for defective pixel repair. | |
| BinningFeature | binning (self) |
| Provides access to the binning feature for resolution reduction and noise improvement. | |
| DecimationFeature | decimation (self) |
| Provides access to the decimation feature for resolution reduction by pixel skipping. | |
| ChromaticAdaptionFeature | chromatic_adaption (self) |
| Provides access to the chromatic adaption feature for adjusting to lighting conditions. | |
| IAutoFeature|None | autofeature_module (self) |
| The used auto feature module. | |
| None | autofeature_module (self, IAutoFeature|None auto_feature_module) |
| Sets an auto feature module for automatic image adjustments. | |
Data Fields | |
| version | |
| str | _modules = module.type |
| bool | _modules = True |
Protected Member Functions | |
| tuple[IModule,...] | _modules (self) |
| Retrieves the sequence of processing modules for the pipeline in execution order. | |
| tuple[IFeature,...] | _features (self) |
| DebayerChannelLayout | _channel_layout_from_output_pixelformat (self, PixelFormat output_pixel_format) |
| bool | _has_rgb_channels (self, PixelFormat pixel_format) |
Static Protected Member Functions | |
| Image | _copy_image_buffer_if_same_buffer (Image|IImageView original_image, Image processed_image) |
Image processing pipeline for sequential transformation of raw image frames.
The Pipeline class performs a series of configurable image processing steps on raw or pre-processed image data. It is designed to support a complete transformation workflow, from raw sensor input to final output format, with each stage modular and optionally enabled or configured.
Processing Steps
Auto Features – Analyzes the image for the following dynamic adjustments:
To enable Auto Features, an external module must be provided via::
auto_feature_module = AutoFeatureModule(remote_device_node_map) pipeline.auto_feature_module = auto_feature_module
This module is part of the Auto Feature Library (AFL).
Smart Pixel Format Configuration Inference
The pipeline includes built-in logic to automatically configure certain internal stages based on the input and output formats. For example:
Use the following method to set the desired final pixel format::
pipeline.output_pixel_format = PixelFormat.RGB_8
Configuration
The pipeline can be configured in two ways:
Module Access: Each configurable processing module can be accessed directly, allowing individual configuration::
pipeline.gain.master = 1.2 pipeline.gamma.value = 2.2
Settings File: Load or save all configuration settings::
pipeline.import_settings_from_file("config.json")
pipeline.export_settings_to_file("config.json")
This modular and extensible design enables flexible integration into a variety of image processing applications, from camera pipelines to offline image editing.
Definition at line 37 of file default_pipeline.py.
| None __init__ | ( | self | ) |
Initializes all internal modules to their default configuration.
Definition at line 156 of file default_pipeline.py.
|
protected |
Definition at line 713 of file default_pipeline.py.
|
staticprotected |
Definition at line 247 of file default_pipeline.py.
|
protected |
Definition at line 707 of file default_pipeline.py.
|
protected |
Definition at line 732 of file default_pipeline.py.
|
protected |
Retrieves the sequence of processing modules for the pipeline in execution order.
Definition at line 689 of file default_pipeline.py.
| IAutoFeature | None autofeature_module | ( | self | ) |
The used auto feature module.
Definition at line 654 of file default_pipeline.py.
| None autofeature_module | ( | self, | |
| IAutoFeature | None | auto_feature_module ) |
Sets an auto feature module for automatic image adjustments.
These adjustments can include features such as image brightness, white balance, and focus, depending on the capabilities of the provided module.
| auto_feature_module | The auto feature module. |
Definition at line 662 of file default_pipeline.py.
| BinningFeature binning | ( | self | ) |
Provides access to the binning feature for resolution reduction and noise improvement.
The binning feature reduces image resolution by combining adjacent pixels through averaging or summation, improving signal-to-noise ratio at the cost of resolution.
Definition at line 603 of file default_pipeline.py.
| ChromaticAdaptionFeature chromatic_adaption | ( | self | ) |
Provides access to the chromatic adaption feature for adjusting to lighting conditions.
The chromatic adaption feature adjusts the image's colors based on the known or estimated correlated color temperature of the light source, maintaining consistent color perception.
Definition at line 635 of file default_pipeline.py.
| ColorCorrectionFeature color_correction | ( | self | ) |
Provides access to the color correction feature for color space transformations.
The color correction feature applies a 3x3 transformation matrix to perform color balancing.
Definition at line 513 of file default_pipeline.py.
| DecimationFeature decimation | ( | self | ) |
Provides access to the decimation feature for resolution reduction by pixel skipping.
The decimation feature reduces image resolution by skipping pixels in a defined pattern, providing a faster alternative to binning for resolution reduction.
A reference to the DecimationFeature.
Definition at line 618 of file default_pipeline.py.
| DigitalBlackFeature digital_black | ( | self | ) |
Provides access to the digital black feature for sensor offset correction.
The digital black feature compensates for sensor digital black offsets by subtracting a configurable black level and normalizing the result.
Definition at line 558 of file default_pipeline.py.
| str export_settings_to_string | ( | self | ) |
Converts the current pipeline settings into a string format.
Serializes all relevant configuration parameters of the pipeline into a single string, which can be stored or transferred for later use.
The export includes:
Definition at line 258 of file default_pipeline.py.
| GainFeature gain | ( | self | ) |
Provides access to the gain feature for brightness and white balance adjustments.
The gain feature allows adjustment of master gain (overall brightness) and individual color channel gains (red, green, blue) for white balance correction.
Definition at line 498 of file default_pipeline.py.
| GammaFeature gamma | ( | self | ) |
Provides access to the gamma feature for brightness and contrast adjustments.
The gamma feature applies inverse gamma correction to adjust image luminance, preparing images for linear domain processing or display.
Definition at line 543 of file default_pipeline.py.
| HotpixelCorrectionFeature hotpixel_correction | ( | self | ) |
Provides access to the hot pixel correction feature for defective pixel repair.
The hot pixel correction feature identifies and corrects defective pixels (hot pixels) in camera images by replacing them with interpolated values from neighboring pixels.
Definition at line 588 of file default_pipeline.py.
| None import_settings_from_string | ( | self, | |
| str | settings ) |
Restores pipeline settings from a previously serialized string.
Parses the provided string and applies the contained configuration values to update the internal state of the pipeline accordingly.
This includes:
deserialize method.| settings | A string containing the serialized pipeline configuration. |
| NotPossibleException | If the type is invalid. |
| NotSupportedException | If the version is invalid. |
| CorruptedException | If required module settings are missing. |
Definition at line 303 of file default_pipeline.py.
| MirrorFeature mirror | ( | self | ) |
Provides access to the mirror feature for image mirroring operations.
The mirror feature allows horizontal (left-right) and vertical (up-down) mirroring of images during pipeline processing.
Definition at line 468 of file default_pipeline.py.
| PixelFormat output_pixel_format | ( | self | ) |
The current output pixel format as a PixelFormat enum.
Definition at line 407 of file default_pipeline.py.
| None output_pixel_format | ( | self, | |
| PixelFormat | output_pixel_format ) |
Defines the desired pixel format for processed images.
The pipeline will convert images to this format during processing.
| output_pixel_format | The new pixel format as a PixelFormat enum. |
Definition at line 417 of file default_pipeline.py.
Applies the pipeline to the given image and returns the result as a new image.
The returned image is always a new instance. If no processing is applied, it will be a deep copy of the input.
| image | Input image to be processed. |
Definition at line 216 of file default_pipeline.py.
| ProcessingPolicy processing_policy | ( | self | ) |
The currently used processing policy.
Definition at line 376 of file default_pipeline.py.
| None processing_policy | ( | self, | |
| ProcessingPolicy | policy ) |
Defines the processing policy for the pipeline.
This policy determines the trade-off between processing speed and image quality throughout the entire pipeline.
| policy | Desired processing policy. |
Definition at line 386 of file default_pipeline.py.
| None reset_to_default | ( | self | ) |
Resets all modules in the pipeline to their default state.
Also resets their enabled state.
In addition, this also resets the pipelines internal properties to default:
Definition at line 353 of file default_pipeline.py.
| RotationFeature rotation | ( | self | ) |
Provides access to the rotation feature for image rotation operations.
The rotation feature allows rotating images in 90-degree increments (0°, 90°, 180°, 270°) during pipeline processing.
Definition at line 483 of file default_pipeline.py.
| SaturationFeature saturation | ( | self | ) |
Provides access to the saturation feature for color intensity adjustments.
The saturation feature allows adjustment of color saturation levels, making colors more vivid (higher saturation) or more muted (lower saturation).
Definition at line 528 of file default_pipeline.py.
| SharpeningFeature sharpening | ( | self | ) |
Provides access to the sharpening feature for image detail enhancement.
The sharpening feature applies edge-based sharpening filters to enhance image detail and improve perceived image sharpness.
Definition at line 573 of file default_pipeline.py.
| str type | ( | self | ) |
The pipeline type identifier as a string, primarily used for serialization.
Definition at line 207 of file default_pipeline.py.
| int version | ( | self | ) |
The pipeline version as an integer.
Definition at line 197 of file default_pipeline.py.
|
protected |
Definition at line 194 of file default_pipeline.py.
|
protected |
Definition at line 186 of file default_pipeline.py.
|
protected |
Definition at line 166 of file default_pipeline.py.
|
protected |
Definition at line 188 of file default_pipeline.py.
|
protected |
Definition at line 182 of file default_pipeline.py.
|
protected |
Definition at line 176 of file default_pipeline.py.
|
protected |
Definition at line 168 of file default_pipeline.py.
|
protected |
Definition at line 187 of file default_pipeline.py.
|
protected |
Definition at line 167 of file default_pipeline.py.
|
protected |
Definition at line 180 of file default_pipeline.py.
|
protected |
Definition at line 368 of file default_pipeline.py.
|
protected |
Definition at line 172 of file default_pipeline.py.
|
protected |
Definition at line 181 of file default_pipeline.py.
|
protected |
Definition at line 175 of file default_pipeline.py.
|
protected |
Definition at line 179 of file default_pipeline.py.
|
protected |
Definition at line 185 of file default_pipeline.py.
|
protected |
Definition at line 165 of file default_pipeline.py.
|
protected |
Definition at line 191 of file default_pipeline.py.
|
protected |
Definition at line 286 of file default_pipeline.py.
| str _modules = module.type |
Definition at line 345 of file default_pipeline.py.
| bool _modules = True |
Definition at line 364 of file default_pipeline.py.
|
protected |
Definition at line 171 of file default_pipeline.py.
|
protected |
Definition at line 163 of file default_pipeline.py.
|
protected |
Definition at line 192 of file default_pipeline.py.
|
protected |
Definition at line 183 of file default_pipeline.py.
|
protected |
Definition at line 184 of file default_pipeline.py.
|
protected |
Definition at line 177 of file default_pipeline.py.
|
protected |
Definition at line 174 of file default_pipeline.py.
|
protected |
Definition at line 190 of file default_pipeline.py.
|
protected |
Definition at line 164 of file default_pipeline.py.
| version |
Definition at line 337 of file default_pipeline.py.