Operator Library: Arithmetics
The operator calculates the absolute value of the input, i.e.
Note that the absolute value of the smallest possible negative value will require the same number of bits as its positive equivalent. Therefore, the output bit width is equal to the input bit width. For example, in 8 bit representation, the smallest value will be -128 while the maximum value is 127. After the absolute operation -128 becomes +128 what still requires 8 bit.
Link Parameter | Input Link I | Output Link O |
---|---|---|
Bit Width | [2, 64] | as I |
Arithmetic | signed | as I |
Parallelism | any | as I |
Kernel Columns | any | as I |
Kernel Rows | any | as I |
Img Protocol | {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} | as I |
Color Format | VAF_GRAY, VAF_COLOR | as I |
Color Flavor | FL_NONE | as I |
Max. Img Width | any | as I |
Max. Img Height | any | as I |
The use of operator ABS is shown in the following examples:
-
Examples - Calculates the differences between two successive images. The differences are thresholded and output via DMA channel.
-
Examples - The Kirsch filter is a good edge detection filter for non directional edges.
-
Examples - Roberts Cross Gradient filter example.
-
Examples - A Sobel filter in x-direction only.
-
Examples - A Sobel filter in all 4 directions.
-
Examples - An example of the use of two filters in parallel.
-
'Filter for Line Scan Cameras'
Examples - Explains how to implement a filter for line scan cameras.
-
Examples - A 3x3 Laplace filter.
-
Examples - The examples shows an automatic dead pixel detection and replacement.