Operator Library: Arithmetics
The operator calculates the arctan of the input.
arctan 的輸入範圍為 [∞, ∞]。 此運算子包含一個名為「Resolution」的參數,用以定義輸入值的固定小數點解析度位元數。 輸入範圍由輸入位元數決定,即 =

其中

是輸入端的位元寬度,而 R 則是解析度位元。
arctan 函數的自變數 x 由以下公式決定:

arctan 函數的結果位於 ]- π/2, π/2[ 範圍內。 VisualApplets 中該運算子的輸出值範圍被映射至

其中

為輸出連結上的 Bit Width。因此輸出值為

下圖顯示了 arctan 函數的圖形。

在下圖中,展示了 VisualApplets 運算子的實作。請注意輸入和輸出的 Bit Width。

讓我們來看看一個輸入像素值。例如 -50。 在給定的解析度為 4 的情況下,該像素值的實數表示為 -50/16。 -50/16 的反正切結果為 arctan(-50/16) = -1.26。 在像素值表示法中,此結果會轉為 -51.38,這與圖中顯示的結果相同。
| Link Parameter | Input Link I | Output Link O |
|---|---|---|
| Bit Width | [8, 12] | [8,32] |
| Arithmetic | 有號 | 有號 |
| 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 |
以下範例展示了 ARCTAN 運算子的用法:
-
範例 - 計算影像矩方向與偏心率
-
'Histogram of Oriented Gradients (HOG)'
範例 - Histogram of oriented Gradients
-
'Functional Example for Specific Operators of Library Arithmentics: Trigonometric Functions'
範例 - operator 使用方式示範

上一頁

