vx_context context; vx_image in_image1 = NULL; vx_image in_image2 = NULL; vx_image out_mulimage = NULL; vx_graph graph = NULL; vx_node node1 = NULL; vx_scalar scale = NULL; vx_rectangle_t rect = {0,0,IMAGE_WIDTH,IMAGE_HEIGHT}; vx_map_id in_map_id1 = (vx_map_id)(vx_status)VX_ERROR_INVALID_PARAMETERS; vx_map_id in_map_id2 = (vx_map_id)(vx_status)VX_ERROR_INVALID_PARAMETERS; vx_map_id out_map_id = (vx_map_id)(vx_status)VX_ERROR_INVALID_PARAMETERS; vx_imagepatch_addressing_t in_image_addr1, in_image_addr2, out_image_addr; void *in_data_ptr1, *in_data_ptr2, *out_data_ptr; vx_uint32 x, y; vx_float32 scale_val = 1.0f; vx_status status; /** * - 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 * \code */ context = vxCreateContext(); /** \endcode */ /** * - Create input image object and access the rectangular patch on the image object plane * \code */ in_image1 = vxCreateImage(context, IMAGE_WIDTH, IMAGE_HEIGHT, VX_DF_IMAGE_U8); vxSetReferenceName((vx_reference)in_image1, "INPUT1"); status = vxMapImagePatch(in_image1, &rect, 0, &in_map_id1, &in_image_addr1, (void**)&in_data_ptr1, (vx_enum)VX_WRITE_ONLY, (vx_enum)VX_MEMORY_TYPE_HOST, (vx_enum)VX_NOGAP_X); in_image2 = vxCreateImage(context, IMAGE_WIDTH, IMAGE_HEIGHT, VX_DF_IMAGE_U8); vxSetReferenceName((vx_reference)in_image2, "INPUT2"); status = vxMapImagePatch(in_image2, &rect, 0, &in_map_id2, &in_image_addr2, (void**)&in_data_ptr2, (vx_enum)VX_WRITE_ONLY, (vx_enum)VX_MEMORY_TYPE_HOST, (vx_enum)VX_NOGAP_X); /** * - Populate the pixel values with a known value */ for(y=0; y