Operator Library: Base
The operator CastType changes the logical link property Arithmetic. The bits of the input and output values are equal. No changes of the value are done in hardware. Therefore, the operator does not require any FPGA resources.
Bit Width | Input Value | Input Arithmetic | Output Arithmetic | Output Value | Comment | ||
---|---|---|---|---|---|---|---|
Decimal | Binary | Decimal | Binary | ||||
4 | 5 | 0101 | unsigned | signed | 5 | 0101 | |
4 | 10 | 1010 | unsigned | signed | -6 | 1010 | interpretation of value has been changed |
4 | 5 | 0101 | signed | unsigned | 5 | 0101 | |
4 | -1 | 1111 | signed | unsigned | 15 | 1111 | interpretation of value has been changed |
Table 32. Examples
The use of operator CastType is shown in the following examples:
-
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 - Shows how to vertically mirror an image. Note the mirroring of the parallel words and the pixel.
-
'High Dynamic Range and Low Dynamic Range Example Using Camera Response Function'
Examples - High Dynamic Range According to Debevec
-
'High Dynamic Range and Low Dynamic Range Example with a Weighted Linear Ansatz'
Examples - High Dynamic Range with Linear Ansatz
-
'2D Shading Correction / Flat Field Correction'
Examples - The example shows the implementation of a 2D shading correction. Correction values are stored in frame grabber RAM. The applet performs a high precision offset and gain correction.
-
'2D Shading Correction / Flat Field Correction Using Operator RamLUT'
Examples - The example shows the implementation of a 2D shading correction. Correction values are stored in the operator RamLUT. The applet performs a high precision offset and gain correction.
-
'1D Shading Correction Using Block RAM'
Examples - The example shows an 1D shading correction. The correction values are stored in block RAM memory.
-
'1D Shading Correction Using Frame Grabber RAM'
Examples - The example shows an 1D shading correction. The correction values are stored in Frame Grabber RAM.