![]() |
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 | PHASE_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_phase_out.bmp" |
Phase file name. | |
#define | MAGNITUDE_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_magnitude_out.bmp" |
Magnitude file name. | |
#define | GRAD_X_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_grad_x_out.bmp" |
Gradient X file name. | |
#define | GRAD_Y_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_grad_y_out.bmp" |
Gradient Y file name. | |
Functions | |
void | vx_tutorial_graph_image_gradients () |
Tutorial Entry Point. More... | |
Performs a Sobel filter followed by a magnitude node and phase node on the X and Y outputs of the Sobel filter.
In this tutorial we learn the below concepts,
To include OpenVX interfaces include below file
Follow the comments in the function vx_tutorial_graph_image_gradients() to understand this tutorial
Definition in file vx_tutorial_graph_image_gradients.c.
void vx_tutorial_graph_image_gradients | ( | ) |
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'.
- 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'.
- 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'.
- 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 graph.
- Create OpenVX node object.
Creates an OpenVX Sobel 3x3 node with in_image input and grad_x and grad_y output.
- Set node target CPU.
Sets target CPU for node[i] to DSP1
- Create OpenVX node object.
Creates an OpenVX Magnitude node with grad_x and grad_y input and magnitude output.
- Set node target CPU.
Sets target CPU for node[i] to DSP1
- Create OpenVX node object.
Creates an OpenVX Phase node with grad_x and grad_y input and phase output.
- Set node target CPU.
Sets target CPU for node[i] to DSP2
- Create OpenVX node object.
Creates an OpenVX Convert Depth node with magnitude input and magnitude_image output. The conversion policy is Saturate and the shift value is shift.
- Set node target CPU.
Sets target CPU for node[i] to DSP1
- Create OpenVX node object.
Creates an OpenVX Convert Depth node with grad_x input and grad_x_image output. The conversion policy is Saturate and the shift value is shift.
- Set node target CPU.
Sets target CPU for node[i] to DSP1
- Create OpenVX node object.
Creates an OpenVX Convert Depth node with grad_y input and grad_y_image output. The conversion policy is Saturate and the shift value is shift.
- Verify graph object.
Verifies that all parameters of graph object are valid.
export graph to dot file, which can be coverted to jpg using dot tool
- Show graph attributes.
Follow the comments in show_graph_attributes() to see how graph attributes are queried and displayed.
- Show node attributes.
Follow the comments in show_node_attributes() to see how node attributes are queried and displayed.
- Schedule graph.
Schedules graph for future execution. vxVerifyGraph must return VX_SUCCESS before this function will pass.
- Wait graph.
Waits for graph to complete.
- Show graph attributes.
Follow the comments in show_graph_attributes() to see how graph attributes are queried and displayed.
- Show node attributes.
Follow the comments in show_node_attributes() to see how node attributes are queried and displayed.
- 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
- 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
- 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
- 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 scalar object.
Since we are done with using this scalar object, release it
- Release node object.
Since we are done with using this node object, release it
- Release graph object.
Since we are done with using this graph 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 118 of file vx_tutorial_graph_image_gradients.c.