Operator ARCCOT

Operator Library: Arithmetics

此運算子會計算輸入的反餘切(arccot)。

arccot 的輸入範圍為 [-∞, ∞]。 此運算子包含一個 Resolution 參數,用於定義輸入值的定點解析度位元。 輸入範圍由輸入位元數決定 =

其中

是輸入處的 Bit Width,而 R 則是解析度位元。

arccot 函數的引數 x 由以下決定

arccot 函數的結果範圍在 ]0, π[ 之間。 該運算子在 VisualApplets 中的輸出值範圍會對應至

其中

是輸出 link 處的 Bit Width。因此輸出值為

下圖顯示了 arccot 函數的繪圖。

下一張圖顯示了 VisualApplets Operator 的實作。請注意輸入與輸出的 Bit Width。

讓我們來看一個輸入像素值。例如 -100。 給定解析度為 4,該像素值的實數表示法為 -100/16。 -100/16 的 arccot 結果為 arccot(-100/16) = 2.98。 以像素值表示法來看,此結果變為 122,這與圖表中顯示的相同。

I/O Properties

Property Value
Operator Type O
Input Link I, data input
Output Link O, data output

支援的 Link 格式

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

參數

ResolutionBits
Type static parameter
Default 8
Range [0..OutputBitWidth]

此參數如上述說明,用於定義輸入值的精確度。

使用範例

以下範例顯示了 ARCCOT 運算子的使用方式: