オペレーター CONST

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.

I/O Property

Property 値
オペレータータイプ O
Input Link I, data input
Output Link O, data output

サポートされているリンクフォーマット

Link Parameter Input Link I Output Link O
Bit Width [1, 64]1 [1, 63]2
Arithmetic {unsigned, signed} {unsigned, signed}
Parallelism any as I
Kernel Columns any any3
Kernel Rows any any4
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D, VALT_SIGNAL} as I
Color Format any any
Color Flavor any any
Max. Img Width any as I
Max. Img Height any as I

1

入力 Bit Width の範囲は [1, 64] です。 符号付き入力の場合の範囲は [2, 64] です。 符号なしカラー入力の場合の範囲は [3, 63] であり、符号付きカラーの場合の範囲は [6, 63] です。

2

符号なし演算の出力範囲は [1, 63] です。 符号付き出力の場合、範囲は [2, 64] です。 符号なしカラー出力の場合、範囲は [3, 63] であり、符号付きカラー出力の場合、範囲は [6, 63] です。

3 4

すべてのカーネルコンポーネントに同じ const 値が使用されます。

パラメーター

値
タイプ static/dynamic read/write parameter
Default 0
範囲 出力リンクの Arithmetic および Bit Width に依存します

このパラメータは、出力リンクでの値を定義します。 パラメータが Static に設定されている場合、値は設計時に選択されます。 パラメータが Dynamic である場合、実行時に値を変更することが可能です。

使用例

CONST オペレーターの使用例を以下に示します。

  • 'Adaptive Threshold'

    ローカルのアダプティブしきい値処理の二値化の例。 8×8ピクセルのカーネルサイズを使用します。

  • 'Line Mirror'

    Examples - 画像を垂直方向に反転させる方法を示します。 パラレルワードとピクセルの反転に注意してください。

  • 'Laser Triangulation'

    例 - High Speedかつ頑健なレーザーライン検出アルゴリズム。 このアルゴリズムは、サブピクセル精度の結果を得るために重心座標を決定します。