120 #include <ch03_graph/vx_tutorial_graph_user_kernel_pytiovx_uc.h> 124 #define IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" 127 #define OUT_USER_KERNEL_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_user_kernel_pytiovx_out.bmp" 130 #define OUT_TARGET_KERNEL_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_target_kernel_pytiovx_out.bmp" 148 vx_tutorial_graph_user_kernel_pytiovx_uc_t uc;
169 if(add_as_target_kernel)
175 printf(
" vx_tutorial_graph_user_kernel_pytiovx: Tutorial Started !!! \n");
205 printf(
" vx_tutorial_graph_user_kernel_pytiovx: ERROR: unable to add user kernel !!!\n");
220 vx_tutorial_graph_user_kernel_pytiovx_uc_create(&uc, add_as_target_kernel);
251 vx_tutorial_graph_user_kernel_pytiovx_uc_verify(&uc);
263 printf(
" Executing graph ...\n");
269 vx_tutorial_graph_user_kernel_pytiovx_uc_run(&uc);
272 printf(
" Executing graph ... Done !!!\n");
280 printf(
" Saving to file %s ...\n", out_file);
291 vx_tutorial_graph_user_kernel_pytiovx_uc_delete(&uc);
312 printf(
" vx_tutorial_graph_user_kernel_pytiovx: Tutorial Done !!! \n");
#define OUT_TARGET_KERNEL_FILE_NAME
Output file name when tutorial is run with target kernel.
Interface to TI extension APIs.
vx_status tivx_utils_load_vximage_from_bmpfile(vx_image image, char *filename, vx_bool convert_to_gray_scale)
Load data from BMP file into a previously created vx_image object.
vx_status phase_rgb_user_kernel_remove(vx_context context)
Remove user/target kernel from context.
void show_graph_attributes(vx_graph graph)
Show attributes of previously created graph.
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
struct _vx_context * vx_context
void vx_tutorial_graph_user_kernel_pytiovx(vx_bool add_as_target_kernel)
Tutorial Entry Point.
vx_status phase_rgb_user_kernel_add(vx_context context, vx_bool add_as_target_kernel)
Add user/target kernel to OpenVX context.
#define IN_FILE_NAME
Input file name.
void show_image_attributes(vx_image image)
Show attributes of previously created image.
#define OUT_USER_KERNEL_FILE_NAME
Output file name when tutorial is run with user kernel.
vx_context VX_API_CALL vxCreateContext()
vx_status VX_API_CALL tivxExportGraphToDot(vx_graph graph, const char *output_file_path, const char *output_file_prefix)
Export graph representation as DOT graph file.
vx_status tivx_utils_save_vximage_to_bmpfile(const char *filename, vx_image image)
Save data from image object to PNG file.