Operator Library: Arithmetics
该算子计算输入的反正切值。
arctan 的输入范围为 [-∞, ∞]。 此算子包含一个参数 Resolution,用于定义输入值的定点分辨率位数。 输入范围由输入位数决定 =

其中

是输入的 Bit Width,R 是分辨率位数。
arctan 函数的自变量 x 由下式确定

arctan 函数的结果范围在 ]-π/2, π/2[ 之间。 该算子在 VisualApplets 中的输出值范围映射到

其中

是输出 link 上的 Bit Width。因此输出值为

下图显示了 arctan 函数的曲线图。

下一图表展示了 VisualApplets operator 的实现。请注意输入和输出的 Bit Width。

我们来看一个输入像素值。例如 -50。 给定分辨率为 4 时,该像素值的实际值表示为 -50/16。 -50/16 的 arctan 结果为 arctan(-50/16) = -1.26。 在像素值表示中,该结果变为 -51.38,这与图表中显示的一致。
| 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 |
以下示例展示了 ARCTAN 算子的用法:
-
Example - Calculates image moments orientation and eccentricity
-
示例 - 梯度方向直方图
-
'Functional Example for Specific Operators of Library Arithmentics: Trigonometric Functions'
示例 - 算子使用方法演示

上一页

