IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
debayer_channel_layout.py
Go to the documentation of this file.
1from __future__ import annotations
2
3from enum import Enum
4
5from ids_peak_icv.exceptions import NotSupportedException
6
7
9 """!
10 @brief
11 Specifies the channel layout used by the debayer module in image processing pipelines.
12
13 @ingroup ids_peak_icv_python_pipeline_modules
14 @since ids_peak_icv 1.0
15 """
16 RGB = 0
17 """!
18 @brief
19 Red-Green-Blue format with 3 channels.
20
21 @since ids_peak_icv 1.0
22 """
23
24 BGR = 1
25 """!
26 @brief
27 Blue-Green-Red format with 3 channels.
28
29 @since ids_peak_icv 1.0
30 """
31
32 RGBA = 2
33 """!
34 @brief
35 Red-Green-Blue-Alpha format with 4 channels.
36
37 @since ids_peak_icv 1.0
38 """
39
40 BGRA = 3
41 """!
42 @brief
43 Blue-Green-Red-Alpha format with 4 channels.
44
45 @since ids_peak_icv 1.0
46 """
47
48 @property
49 def string_value(self) -> str:
50 """!
51 @brief
52 Return the string identifier for this channel layout.
53
54 @since ids_peak_icv 1.0
55 """
56 return self.name
57
58 @staticmethod
59 def create_from_string_value(string_value: str) -> DebayerChannelLayout:
60 if string_value == "RGB":
61 return DebayerChannelLayout.RGB
62 if string_value == "BGR":
63 return DebayerChannelLayout.BGR
64 if string_value == "RGBA":
65 return DebayerChannelLayout.RGBA
66 if string_value == "BGRA":
67 return DebayerChannelLayout.BGRA
68
69 raise NotSupportedException(f"The given channel layout is not supported. Given: {string_value}")
Thrown when a requested operation is not implemented or supported.
Definition exceptions.py:71
Specifies the channel layout used by the debayer module in image processing pipelines.
str string_value(self)
Return the string identifier for this channel layout.