99 #define IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" 102 #define PHASE_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_phase_out.bmp" 105 #define MAGNITUDE_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_magnitude_out.bmp" 108 #define GRAD_X_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_grad_x_out.bmp" 111 #define GRAD_Y_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_graph_image_gradients_grad_y_out.bmp" 113 #define NUM_NODES (6u) 138 vx_node node[NUM_NODES] = {NULL};
140 int32_t shift_value = 0;
145 printf(
" vx_tutorial_graph_image_gradients: Tutorial Started !!! \n");
402 node[i] =
vxPhaseNode(graph, grad_x, grad_y, phase);
433 magnitude, magnitude_image,
461 grad_x, grad_x_image,
489 grad_y, grad_y_image,
538 for(i=0; i<
sizeof(node)/
sizeof(node[0]); i++)
556 printf(
" Executing graph ...\n");
578 printf(
" Executing graph ... Done !!!\n");
589 for(i=0; i<
sizeof(node)/
sizeof(node[0]); i++)
679 for(i=0; i<
sizeof(node)/
sizeof(node[0]); i++)
714 printf(
" vx_tutorial_graph_image_gradients: Tutorial Done !!! \n");
struct _vx_image * vx_image
vx_status VX_API_CALL vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)
vx_scalar VX_API_CALL vxCreateScalar(vx_context context, vx_enum data_type, const void *ptr)
Interface to TI extension APIs.
void show_node_attributes(vx_node node)
Show attributes of previously created node.
#define GRAD_X_FILE_NAME
Gradient X file name.
vx_status VX_API_CALL vxReleaseScalar(vx_scalar *scalar)
void show_graph_attributes(vx_graph graph)
Show attributes of previously created graph.
vx_bool tivxIsTargetEnabled(const char target_name[])
Utility function to know if target is enabled or not.
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
struct _vx_context * vx_context
vx_status VX_API_CALL vxSetNodeTarget(vx_node node, vx_enum target_enum, const char *target_string)
vx_node VX_API_CALL vxSobel3x3Node(vx_graph graph, vx_image input, vx_image output_x, vx_image output_y)
struct _vx_reference * vx_reference
#define TIVX_TARGET_DSP2
Name for DSP target class, instance 2.
vx_image VX_API_CALL vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color)
#define IN_FILE_NAME
Input file name.
vx_status VX_API_CALL vxWaitGraph(vx_graph graph)
vx_node VX_API_CALL vxConvertDepthNode(vx_graph graph, vx_image input, vx_image output, vx_enum policy, vx_scalar shift)
#define TIVX_TARGET_DSP1
Name for DSP target class, instance 1.
vx_status VX_API_CALL vxReleaseGraph(vx_graph *graph)
vx_status VX_API_CALL vxSetReferenceName(vx_reference ref, const vx_char *name)
vx_node VX_API_CALL vxMagnitudeNode(vx_graph graph, vx_image grad_x, vx_image grad_y, vx_image mag)
#define GRAD_Y_FILE_NAME
Gradient Y file name.
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 vxPhaseNode(vx_graph graph, vx_image grad_x, vx_image grad_y, vx_image orientation)
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_CONVERT_POLICY_SATURATE
vx_context VX_API_CALL vxCreateContext()
#define MAGNITUDE_FILE_NAME
Magnitude file name.
struct _vx_graph * vx_graph
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 VX_API_CALL vxReleaseNode(vx_node *node)
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)
struct _vx_scalar * vx_scalar
#define PHASE_FILE_NAME
Phase file name.
void vx_tutorial_graph_image_gradients()
Tutorial Entry Point.