118 #define IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" 121 #define OUT_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_image_color_convert_out.bmp" 139 vx_node node0 = NULL, node1 = NULL;
145 printf(
" vx_tutorial_image_color_convert: Tutorial Started !!! \n");
291 printf(
" Executing graph ...\n");
313 printf(
" Executing graph ... Done !!!\n");
391 printf(
" vx_tutorial_image_color_convert: Tutorial Done !!! \n");
395 #define MAX_ATTRIBUTE_NAME (32u) 408 vx_uint32 num_nodes=0, num_params=0, ref_count=0;
412 char ref_name_invalid[MAX_ATTRIBUTE_NAME];
413 char state_name[MAX_ATTRIBUTE_NAME];
433 strncpy(state_name,
"VX_GRAPH_STATE_UNVERIFIED", MAX_ATTRIBUTE_NAME);
436 strncpy(state_name,
"VX_GRAPH_STATE_VERIFIED", MAX_ATTRIBUTE_NAME);
439 strncpy(state_name,
"VX_GRAPH_STATE_RUNNING", MAX_ATTRIBUTE_NAME);
442 strncpy(state_name,
"VX_GRAPH_STATE_ABANDONED", MAX_ATTRIBUTE_NAME);
445 strncpy(state_name,
"VX_GRAPH_STATE_COMPLETED", MAX_ATTRIBUTE_NAME);
448 strncpy(state_name,
"VX_GRAPH_STATE_UNKNOWN", MAX_ATTRIBUTE_NAME);
454 strncpy(ref_name_invalid,
"INVALID_REF_NAME", MAX_ATTRIBUTE_NAME);
455 ref_name = &ref_name_invalid[0];
458 printf(
" VX_TYPE_GRAPH: %s, %d nodes, %s, avg perf %9.6fs, %d parameters, %d refs\n",
462 perf.
avg/1000000000.0,
483 char ref_name_invalid[MAX_ATTRIBUTE_NAME];
484 char status_name[MAX_ATTRIBUTE_NAME];
503 strncpy(status_name,
"VX_SUCCESS", MAX_ATTRIBUTE_NAME);
506 strncpy(status_name,
"VX_FAILURE", MAX_ATTRIBUTE_NAME);
509 strncpy(status_name,
"VX_FAILURE_OTHER", MAX_ATTRIBUTE_NAME);
515 strncpy(ref_name_invalid,
"INVALID_REF_NAME", MAX_ATTRIBUTE_NAME);
516 ref_name = &ref_name_invalid[0];
519 printf(
" VX_TYPE_NODE: %s, %d params, avg perf %9.6fs, %s, %d refs\n",
522 perf.
avg/1000000000.0,
struct _vx_image * vx_image
#define IN_FILE_NAME
Input file name.
vx_status VX_API_CALL vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)
void vx_tutorial_image_color_convert()
Tutorial Entry Point.
Interface to TI extension APIs.
vx_status VX_API_CALL vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)
vx_status VX_API_CALL vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size)
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
struct _vx_context * vx_context
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.
struct _vx_reference * vx_reference
vx_image VX_API_CALL vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color)
VX_GRAPH_STATE_UNVERIFIED
vx_status VX_API_CALL vxWaitGraph(vx_graph graph)
#define OUT_FILE_NAME
Output file name.
vx_status VX_API_CALL vxReleaseGraph(vx_graph *graph)
vx_status VX_API_CALL vxSetReferenceName(vx_reference ref, const vx_char *name)
void show_node_attributes(vx_node node)
Show attributes of previously created node.
vx_status VX_API_CALL vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size)
void show_image_attributes(vx_image image)
Show attributes of previously created image.
vx_image tivx_utils_create_vximage_from_bmpfile(vx_context context, const char *filename, vx_bool convert_to_gray_scale)
Create a image data object given BMP filename as input.
vx_node VX_API_CALL vxColorConvertNode(vx_graph graph, vx_image input, vx_image output)
vx_graph VX_API_CALL vxCreateGraph(vx_context context)
vx_status VX_API_CALL vxVerifyGraph(vx_graph graph)
vx_status VX_API_CALL vxScheduleGraph(vx_graph graph)
vx_context VX_API_CALL vxCreateContext()
struct _vx_graph * vx_graph
vx_status VX_API_CALL vxReleaseNode(vx_node *node)
void show_graph_attributes(vx_graph graph)
Show attributes of previously created graph.
vx_status tivx_utils_save_vximage_to_bmpfile(const char *filename, vx_image image)
Save data from image object to PNG file.
struct _vx_node * vx_node
vx_status VX_API_CALL vxReleaseImage(vx_image *image)
vx_image VX_API_CALL vxCreateVirtualImage(vx_graph graph, vx_uint32 width, vx_uint32 height, vx_df_image color)