![]() |
The OpenVX Specification
a73e458
|
Converts image bit depth.
This kernel converts an image from some source bit-depth to another bit-depth as described by the table below [R00040]. If the input value is unsigned the shift must be in zeros [R00041]. If the input value is signed, the shift used must be an arithmetic shift [R00042]. The columns in the table below are the output types and the rows are the input types. The API version on which conversion is supported is also listed. (An X denotes an invalid operation.)
| I/O | U8 | U16 | S16 | U32 | S32 |
|---|---|---|---|---|---|
| U8 | X | 1.0 | |||
| U16 | X | X | |||
| S16 | 1.0 | X | X | ||
| U32 | X | X | |||
| S32 | X | X |
The table below identifies the conversion types for the allowed bith depth conversions.
| From | To | Conversion Type |
|---|---|---|
| U8 | S16 | Up-conversion |
| S16 | U8 | Down-conversion |
Down-conversions with VX_CONVERT_POLICY_WRAP follow this equation [R00043]:
Down-conversions with VX_CONVERT_POLICY_SATURATE follow this equation [R00044]:
Up-conversions ignore the policy and perform this operation [R00045]:
The valid values for 'shift' are as specified below [R00046], all other values produce implementation-dependant behavior.
Functions | |
| vx_node VX_API_CALL | vxConvertDepthNode (vx_graph graph, vx_image input, vx_image output, vx_enum policy, vx_scalar shift) |
| [Graph] Creates a bit-depth conversion node. More... | |
| vx_node VX_API_CALL vxConvertDepthNode | ( | vx_graph | graph, |
| vx_image | input, | ||
| vx_image | output, | ||
| vx_enum | policy, | ||
| vx_scalar | shift | ||
| ) |
[Graph] Creates a bit-depth conversion node.
| [in] | graph | The reference to the graph [R00332]. |
| [in] | input | The input image [R00333]. |
| [out] | output | The output image [R00334]. |
| [in] | policy | Use a The Conversion Policy Enumeration. value [R00335]. |
| [in] | shift | A scalar containing a VX_TYPE_INT32 of the shift value [R00336]. |
vx_node [R00337]. | vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |