Operator Library: Arithmetics
このオペレーターは入力の正弦(サイン)を計算します。
サイン関数の入力範囲は [-\u221e, \u221e] です。 サイン関数の周期性のため、VisualApplets オペレーターの入力範囲は [-\u03c0, \u03c0] に制限されます。 つまり、入力の最小値は -\u03c0 で、入力の最大値に 1 を加えた値は \u03c0 です。 したがって、入力に +\u03c0 の値を持たせることはできません。
したがって、サイン関数の引数 x は次のように決定されます。

ここで、

は入力リンクの Bit Width です。
サイン関数の結果は [-1, 1] の範囲になります。 VisualApplets 内のオペレーターの出力値範囲は次のようにマッピングされます。

ここで、

は出力リンクにおける Bit Width です。したがって、出力値は以下のようになります

次の画像は、サイン関数のプロットを示しています。

次の図には、VisualApplets オペレーターの実装が示されています。入力および出力の Bit Width に注意してください。

入力ピクセル値を見てみましょう。例えば -50 です。 指定された Bit Width が 8 の場合、ピクセル値の実数値表現は -50 * pi / 128 になります。 その結果、サインの計算結果は -0.94 になります。 ピクセル値表現では、この結果はプロットに示されているものと同じ -121 になります。
| Link Parameter | Input Link I | Output Link O |
|---|---|---|
| Bit Width | [8, 12] | [8, 32] |
| Arithmetic | signed | signed |
| Parallelism | any | as I |
| Kernel Columns | 1 | as I |
| Kernel Rows | 1 | as I |
| Img Protocol | {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} | as I |
| Color Format | VAF_GRAY | as I |
| Color Flavor | FL_NONE | as I |
| Max. Img Width | any | as I |
| Max. Img Height | any | as I |
SIN オペレーターの使用例を次に示します。
-
Examples - デバッグ目的で、Scopeオペレーターにはグレースケール画像を解析するためのオプションが用意されています。
-
'Geometric Transformation and Distortion Correction'
Examples- Geometric Transformation and Distortion Correction using PixelReplicator
-
'Functional Example for Specific Operators of Library Arithmentics: Trigonometric Functions'
使用例 - オペレーターの使用方法のデモ

前へ

