105 #define IN_FILE_NAME "${VX_TEST_DATA_PATH}/colors.bmp" 123 printf(
" vx_tutorial_image_query: Tutorial Started !!! \n");
179 printf(
" vx_tutorial_image_query: Tutorial Done !!! \n");
183 #define MAX_ATTRIBUTE_NAME (32u) 196 vx_uint32 width=0, height=0, ref_count=0;
199 vx_enum color_space=0, channel_range=0, memory_type=0;
201 char df_name[MAX_ATTRIBUTE_NAME];
202 char color_space_name[MAX_ATTRIBUTE_NAME];
203 char channel_range_name[MAX_ATTRIBUTE_NAME];
204 char memory_type_name[MAX_ATTRIBUTE_NAME];
205 char ref_name_invalid[MAX_ATTRIBUTE_NAME];
230 strncpy(df_name,
"VX_DF_IMAGE_VIRT", MAX_ATTRIBUTE_NAME);
233 strncpy(df_name,
"VX_DF_IMAGE_RGB", MAX_ATTRIBUTE_NAME);
236 strncpy(df_name,
"VX_DF_IMAGE_RGBX", MAX_ATTRIBUTE_NAME);
239 strncpy(df_name,
"VX_DF_IMAGE_NV12", MAX_ATTRIBUTE_NAME);
242 strncpy(df_name,
"VX_DF_IMAGE_NV21", MAX_ATTRIBUTE_NAME);
245 strncpy(df_name,
"VX_DF_IMAGE_UYVY", MAX_ATTRIBUTE_NAME);
248 strncpy(df_name,
"VX_DF_IMAGE_YUYV", MAX_ATTRIBUTE_NAME);
251 strncpy(df_name,
"VX_DF_IMAGE_IYUV", MAX_ATTRIBUTE_NAME);
254 strncpy(df_name,
"VX_DF_IMAGE_YUV4", MAX_ATTRIBUTE_NAME);
257 strncpy(df_name,
"VX_DF_IMAGE_U8", MAX_ATTRIBUTE_NAME);
260 strncpy(df_name,
"VX_DF_IMAGE_U16", MAX_ATTRIBUTE_NAME);
263 strncpy(df_name,
"VX_DF_IMAGE_S16", MAX_ATTRIBUTE_NAME);
266 strncpy(df_name,
"VX_DF_IMAGE_U32", MAX_ATTRIBUTE_NAME);
269 strncpy(df_name,
"VX_DF_IMAGE_S32", MAX_ATTRIBUTE_NAME);
272 strncpy(df_name,
"VX_DF_IMAGE_UNKNOWN", MAX_ATTRIBUTE_NAME);
279 strncpy(color_space_name,
"VX_COLOR_SPACE_NONE", MAX_ATTRIBUTE_NAME);
282 strncpy(color_space_name,
"VX_COLOR_SPACE_BT601_525", MAX_ATTRIBUTE_NAME);
285 strncpy(color_space_name,
"VX_COLOR_SPACE_BT601_625", MAX_ATTRIBUTE_NAME);
288 strncpy(color_space_name,
"VX_COLOR_SPACE_BT709", MAX_ATTRIBUTE_NAME);
291 strncpy(color_space_name,
"VX_COLOR_SPACE_UNKNOWN", MAX_ATTRIBUTE_NAME);
295 switch(channel_range)
298 strncpy(channel_range_name,
"VX_CHANNEL_RANGE_FULL", MAX_ATTRIBUTE_NAME);
301 strncpy(channel_range_name,
"VX_CHANNEL_RANGE_RESTRICTED", MAX_ATTRIBUTE_NAME);
304 strncpy(channel_range_name,
"VX_CHANNEL_RANGE_UNKNOWN", MAX_ATTRIBUTE_NAME);
311 strncpy(memory_type_name,
"VX_MEMORY_TYPE_NONE", MAX_ATTRIBUTE_NAME);
314 strncpy(memory_type_name,
"VX_MEMORY_TYPE_HOST", MAX_ATTRIBUTE_NAME);
317 strncpy(memory_type_name,
"VX_MEMORY_TYPE_UNKNOWN", MAX_ATTRIBUTE_NAME);
323 strncpy(ref_name_invalid,
"INVALID_REF_NAME", MAX_ATTRIBUTE_NAME);
324 ref_name = &ref_name_invalid[0];
327 printf(
" VX_TYPE_IMAGE: %s, %d x %d, %d plane(s), %d B, %s %s %s %s, %d refs\n",
331 (uint32_t)num_planes,
struct _vx_image * vx_image
void show_image_attributes(vx_image image)
Show attributes of previously created image.
vx_status VX_API_CALL vxQueryImage(vx_image image, 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)
#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_status VX_API_CALL vxSetReferenceName(vx_reference ref, const vx_char *name)
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.
void vx_tutorial_image_query()
Tutorial Entry Point.
vx_context VX_API_CALL vxCreateContext()
VX_CHANNEL_RANGE_RESTRICTED
vx_status VX_API_CALL vxReleaseImage(vx_image *image)