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. | |
#define | OUT_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_image_extract_channel_out.bmp" |
Output file name. | |
Functions | |
void | vx_tutorial_image_extract_channel () |
Tutorial Entry Point. More... | |
Extract channels from RGB image using immediate mode then combine them in opposite order.
In this tutorial we learn the below concepts,
To include OpenVX interfaces include below file
To include OpenVX interfaces for immediate mode include below file
Follow the comments in the function vx_tutorial_image_extract_channel() to understand this tutorial
Definition in file vx_tutorial_image_extract_channel.c.
void vx_tutorial_image_extract_channel | ( | ) |
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.
- Create OpenVX image object.
Creates an OpenVX image object of 'width' x 'height' and having data format 'df'.
- Show image attributes.
Follow the comments in show_image_attributes() to see how image attributes are queried and displayed.
- Create OpenVX image object.
Creates an OpenVX image object of 'width' x 'height' and having data format 'df'.
- Create OpenVX image object.
Creates an OpenVX image object of 'width' x 'height' and having data format 'df'.
- Show image attributes.
Follow the comments in show_image_attributes() to see how image attributes are queried and displayed.
- Create OpenVX image object.
Creates an OpenVX image object of 'width' x 'height' and having data format 'df'.
- Show image attributes.
Follow the comments in show_image_attributes() to see how image attributes are queried and displayed.
- Performs immediate mode channel extract.
The second argument gives the input image, the third argument gives the channel to extract and the final argument gives the output image.
- Performs immediate mode channel combine.
The second, third and fourth arguments give channels to combine with the last argument being the output image.
- Save image object to bitmap file OUT_FILE_NAME.
Follow the comments in tivx_utils_save_vximage_to_bmpfile() to see how data in vx_image object is accessed to store pixel values from the image object to BMP file OUT_FILE_NAME
- 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 108 of file vx_tutorial_image_extract_channel.c.