TIOVX User Guide
|
Go to the source code of this file.
Macros | |
#define | IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" |
Input file name. | |
Functions | |
void | vx_tutorial_image_query () |
Tutorial Entry Point. More... | |
void | show_image_attributes (vx_image image) |
Show attributes of previously created image. More... | |
Query image for attributes such as width, height and format
In this tutorial we learn the below concepts,
To include OpenVX interfaces include below file
Follow the comments in the function vx_tutorial_image_query() to understand this tutorial
As part of this tutorial, we create few utility functions as listed below. These functions will be used in subsequent tutorials to display node and graph attributes.
Utility function | Description |
---|---|
show_image_attributes() | Displays attributes of a previously created image. NOTE: This function though listed in this tutorial is used in later tutorials |
Definition in file vx_tutorial_image_query.c.
void vx_tutorial_image_query | ( | ) |
Tutorial Entry Point.
- Define objects that we wish to create in the OpenVX application.
A vx_context object is defined which is used as input parameter for all subesquent OpenVX object create APIs
- Create OpenVX context.
This MUST be done first before any OpenVX API call. The context that is returned is used as input for subsequent OpenVX APIs
- Create image object.
Follow the comments in tivx_utils_create_vximage_from_bmpfile() to see how a vx_image object is created and filled with RGB data from BMP file IN_FILE_NAME
- Show image attributes.
Follow the comments in show_image_attributes() to see how image attributes are queried and displayed.
- Release image object.
Since we are done with using this image object, release it
- Release context object.
Since we are done using OpenVX context, release it. No further OpenVX API calls should be done, until a context is again created using vxCreateContext()
Definition at line 110 of file vx_tutorial_image_query.c.
void show_image_attributes | ( | vx_image | image | ) |
Show attributes of previously created image.
This function queries the vx_image image for its number of nodes, number of parameters, state, performance, reference name and reference count then prints this information.
image | [in] Previouly created image object |
Queries image for width, height, format, planes, size, space, range, range and memory type.
Definition at line 194 of file vx_tutorial_image_query.c.