110 #define IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" 113 #define OUT_FILE_NAME "${VX_TEST_DATA_PATH}/vx_tutorial_image_crop_roi.bmp" 119 tivx_utils_bmp_image_params_t *imgParams);
137 tivx_utils_bmp_image_params_t imgParams;
140 printf(
" vx_tutorial_image_crop_roi: Tutorial Started !!! \n");
225 tivx_utils_bmp_read_release(&imgParams);
238 printf(
" vx_tutorial_image_crop_roi: Tutorial Done !!! \n");
257 tivx_utils_bmp_image_params_t *imgParams)
259 char outFilePath[TIOVX_UTILS_MAXPATHLENGTH];
261 uint32_t width, height, stride;
268 status = tivx_utils_expand_file_path(filename, outFilePath);
270 status = tivx_utils_bmp_read(outFilePath, dcn, imgParams);
275 width = imgParams->width;
276 height = imgParams->height;
277 stride = imgParams->stride_y;
278 df = imgParams->format;
279 data_ptr = imgParams->data;
303 image_addr[0].
dim_x = width;
304 image_addr[0].
dim_y = height;
struct _vx_image * vx_image
vx_status VX_API_CALL vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)
#define IN_FILE_NAME
Input file name.
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
struct _vx_context * vx_context
struct _vx_reference * vx_reference
vx_image VX_API_CALL vxCreateImageFromHandle(vx_context context, vx_df_image color, const vx_imagepatch_addressing_t addrs[], void *const ptrs[], vx_enum memory_type)
vx_status VX_API_CALL vxSetReferenceName(vx_reference ref, const vx_char *name)
vx_image load_image_from_handle_from_file(vx_context context, char *filename, vx_bool convert_to_gray_scale, tivx_utils_bmp_image_params_t *imgParams)
Load image from handle from file.
void show_image_attributes(vx_image image)
Show attributes of previously created image.
#define OUT_FILE_NAME
Output file name.
vx_context VX_API_CALL vxCreateContext()
void vx_tutorial_image_crop_roi()
Tutorial Entry Point.
vx_image VX_API_CALL vxCreateImageFromROI(vx_image img, const vx_rectangle_t *rect)
vx_status tivx_utils_save_vximage_to_bmpfile(const char *filename, vx_image image)
Save data from image object to PNG file.
vx_status VX_API_CALL vxReleaseImage(vx_image *image)