Creates a bit-depth conversion node.
Convert tensor from a specific data type and fixed point position to another data type and fixed point position. The equation for the conversion is as follows:
\[ output = \frac{(\frac{input}{2^{input\_fixed\_point\_position}}-offset)}{norm}*2^{output\_fixed\_point\_position} \]
Where offset and norm are the input parameters in vx_float32. input_fixed_point_position and output_fixed_point_position are the fixed point positions of the input and output respectivly. Is case input or output tensors are of VX_TYPE_FLOAT32 fixed point position 0 is used.
|
| vx_node VX_API_CALL | vxTensorConvertDepthNode (vx_graph graph, vx_tensor input, vx_enum policy, vx_scalar norm, vx_scalar offset, vx_tensor output) |
| | [Graph] Creates a bit-depth conversion node. More...
|
| |
| vx_status VX_API_CALL | vxuTensorConvertDepth (vx_context context, vx_tensor input, vx_enum policy, vx_scalar norm, vx_scalar offset, vx_tensor output) |
| | [Immediate] Performs a bit-depth conversion. More...
|
| |
[Graph] Creates a bit-depth conversion node.
- Parameters
-
| [in] | graph | The reference to the graph. |
| [in] | input | The input tensor. Implementations must support input tensor data type VX_TYPE_INT16 with fixed_point_position 8, and tensor data types VX_TYPE_UINT8 and VX_TYPE_INT8, with fixed_point_position 0. |
| [in] | policy | A VX_TYPE_ENUM of the vx_convert_policy_e enumeration. |
| [in] | norm | A scalar containing a VX_TYPE_FLOAT32 of the normalization value. |
| [in] | offset | A scalar containing a VX_TYPE_FLOAT32 of the offset value subtracted before normalization. |
| [out] | output | The output tensor. Implementations must support input tensor data type VX_TYPE_INT16. with fixed_point_position 8. And VX_TYPE_UINT8 with fixed_point_position 0. |
- Returns
vx_node.
- Return values
-
| vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
[Immediate] Performs a bit-depth conversion.
- Parameters
-
| [in] | context | The reference to the overall context. |
| [in] | input | The input tensor. Implementations must support input tensor data type VX_TYPE_INT16 with fixed_point_position 8, and tensor data types VX_TYPE_UINT8 and VX_TYPE_INT8, with fixed_point_position 0. |
| [in] | policy | A VX_TYPE_ENUM of the vx_convert_policy_e enumeration. |
| [in] | norm | A scalar containing a VX_TYPE_FLOAT32 of the normalization value. |
| [in] | offset | A scalar containing a VX_TYPE_FLOAT32 of the offset value subtracted before normalization. |
| [out] | output | The output tensor. Implementations must support input tensor data type VX_TYPE_INT16. with fixed_point_position 8. And VX_TYPE_UINT8 with fixed_point_position 0. |
- Returns
- A
vx_status_e enumeration.
- Return values
-