Part Number: TDA4VM
Tool/software:
Hi Team,
I'm working with SDK v 08_02_00_05(LINUX+RTOS).
I'm trying to add the text to the bounding box to the working OD application.I tried following snippet and able to get the output as shown in attached image.
static void drawBox(vx_uint8 *y_data, vx_uint8 *cbcr_data, vx_int32 width, vx_int32 height, vx_int32 xmin, vx_int32 ymin, vx_int32 xmax, vx_int32 ymax, vx_int32 label, vx_uint8 color_map[][3], vx_int32 max_classes, float lng)
{
//printf("inside drawbox\n");
vx_uint8 y_label, cb_label, cr_label;
vx_int32 i;
Draw2D_Handle DHandle;
Draw2D_BufInfo DBufInfo;
Draw2D_FontPrm sDist;
Draw2D_FontProperty fontProp;
char lngString[32];
snprintf(lngString, sizeof(lngString), "%.2f", lng);
sDist.fontIdx = 13;
Draw2D_create(&DHandle);
Draw2D_getFontProperty(&sDist, &fontProp);
if(DHandle != NULL)
{
// printf("\nReceived valid Draw2D handle = %u\n...", DHandle);
DBufInfo.bufAddr[0] = y_data;
DBufInfo.bufAddr[1] = cbcr_data;
DBufInfo.bufWidth = width;
DBufInfo.bufHeight = height;
DBufInfo.bufPitch[0] = width;
DBufInfo.bufPitch[1] = width;
//int desiredFontSize = 12; // Set to the desired size
//Draw2D_setFontSize(DHandle, desiredFontSize);
DBufInfo.dataFormat = DRAW2D_DF_YUV420SP_UV;
DBufInfo.transperentColor = DRAW2D_TRANSPARENT_COLOR;
DBufInfo.transperentColorFormat = DRAW2D_TRANSPARENT_COLOR_FORMAT;
Draw2D_setBufInfo(DHandle, &DBufInfo);
Draw2D_drawString(DHandle, xmin, ymax, lngString, &sDist);
Draw2D_delete(DHandle);
}
.....
/*rest of the drawbox functionality*/
....
return 0;
}
Even I have used
DBufInfo.transperentColor = DRAW2D_TRANSPARENT_COLOR;
DBufInfo.transperentColorFormat = DRAW2D_TRANSPARENT_COLOR_FORMAT;, the output still remains the same. Even when I tried changing the static const uint32_t gDraw2D_Font_CharWidth = 10; static const uint32_t gDraw2D_Font_CharHeight = 16; the output on display is as shown in attached image.

I need the text to be transparent and font size should be reduced a little more. Could you please guide me how to achieve this.
Thanks and Regards,
Chaitanya Prakash Uppala