TIOVX User Guide
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <VX/vx.h>
#include <utility.h>
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_load_save_out.bmp" |
Output file name. | |
Functions | |
void | vx_tutorial_image_load_save () |
Tutorial Entry Point. More... | |
Load and save data from OpenVX image objects
In this tutorial we learn the below concepts,
To include OpenVX interfaces include below file
To include utility APIs to read and write BMP file include below file
Follow the comments in the function vx_tutorial_image_load_save() to understand this tutorial
Definition in file vx_tutorial_image_load_save.c.
void vx_tutorial_image_load_save | ( | ) |
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
- Query image object.
Here we print the image dimensions.
- 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 110 of file vx_tutorial_image_load_save.c.