Operator Library: Base
CONST 運算子在輸出連結上提供固定值。 所有輸入值都會被捨棄並由常數取代。 常數可透過 Value 參數定義。 這可以是靜態值或動態值。 因此,該值可以在執行階段進行更改。
請注意,對於 RGB 等多元件格式,常數值是定義為整顆像素的單一值, 而不是單獨的元件。
Example: Output link RGB 24bit, constant value is set to 11862494 (0xB501DE). The output components will then be set to the following const values: R = 222 (0xDE), G = 01 (0x01) and B = 181 (0xB5). The constant concatenates the component values to a single value. The component 0 is placed in LSB area and the highest component in MSB area, i.e. for RGB, the constant value is {B-G-R}. Value = {component N-1, ..., component 0}, with N being the number of the components.
| Value | |
|---|---|
| Type | static/dynamic read/write parameter |
| Default | 0 |
| Range | 取決於輸出連結的 Arithmetic 與 Bit Width |
|
此參數定義輸出連結上的值。 如果參數設為 Static,則該值會在設計階段選定。 如果參數設為 Dynamic,則可以在執行階段變更該值。 |
|
以下範例展示了 CONST 運算子的使用方式:
-
局部自適應閾值化的二值化範例。 使用 8x8 像素的 kernel 大小。
-
範例 - 顯示如何對影像進行垂直鏡射。 請注意平行字組和像素的鏡射。
-
範例 - 一種 High Speed 且強固的雷射線偵測演算法。 此演算法可決定重心座標以取得亞像素解析度結果。





上一頁

