Operator Library: Arithmetics
The operator performs an arithmetic shift of the input data to the right. The number of bits to be shifted is defined using parameter Shift. Each bit at the input is right shifted by the parameterized number of bits.
Bit shifting is usually used to scale a value by a power of two value. For example a right shift by one bit will divide the input value by 2. A right shift by 2 bits will divide the input value by 4.
Each color component is shifted separately.
Shift | |
---|---|
Type | static parameter |
Default | 0 |
Range |
[0, Input BitWidth - 1] for unsigned [0, Input BitWidth - 2] for signed |
This parameter defines the number of bits by which the input is right shifted. |
The use of operator ShiftRight is shown in the following examples:
-
Figure 216, 'ShiftLeft Operator Added for 16Bit Output'
Tutorial - User ShiftLeft to change DMA bit width.
-
'Combine Image Data From Two Camera Sources - Building an Overlay Blend'
Tutorial - From equation to implementation. Explanation on how to implement the overlay blend.
-
Determines the mean value of an image and used the value as threshold value for the next image processed.
-
Example - Histogram thresholding
-
Examples - The blob analysis operator is applied to an input camera image. The applet shows the usage of the blob data in the applet. In this case, the object with the maximum are is localized and the coordinates are used to cut out the object from the original image.
-
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 - A Sobel filter in x-direction only.
-
Examples - A Sobel filter in all 4 directions.
-
Examples - A simple 3x3 box filter.
-
Examples - A Gauss filter using a 5x5 kernel.
-
Examples - Explains the implementation of filters.
-
Examples - An example of the use of two filters in parallel.
-
Examples - Shows how to extract a sub kernel from a filter to obtain the original image data. This example performs a simple local adaptive binarization.
-
'Filter for Line Scan Cameras'
Examples - Explains how to implement a filter for line scan cameras.
-
Examples - A 3x3 Laplace filter.
-
Examples - Downsampling by factor 3x3 without the use of operator SampleDn.
-
Example - Calculates image moments orientation and eccentricity
-
Examples - The examples shows an automatic dead pixel detection and replacement.