Part Number: TDA4VM-Q1
Dear Sir,
I have a scenario,
The display is divided into two windows
window[0] = 4 cam semantic segmentation
window[1] = SRV
window[1] is a fixed view of SRV, but I need to display and select single-camera segmented output in window[0].
I am able to run the 4-cam app with a feature to select any camera for streaming.
I am sharing my two functionalities implemented and need your suggestion for switching only window[0] segmented output for each channel.
********Camera Switch Cases*************************************************************************************************
#ifdef SELECT
case 'f':
channel_prms.active_channel = 0;
vxCopyUserDataObject(switch_ch_obj, 0, sizeof(tivx_select_channel_t), &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
refs1[0] = (vx_reference)switch_ch_obj;
tivxNodeSendCommand(obj->imgMosaicObj.node, 0,TIVX_SWITCH_CHANNEL, refs1, 1u);
printf("App Send Command Done!\n");
break;
case 'b':
channel_prms.active_channel = 1;
vxCopyUserDataObject(switch_ch_obj, 0, sizeof(tivx_select_channel_t), &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
refs1[0] = (vx_reference)switch_ch_obj;
tivxNodeSendCommand(obj->imgMosaicObj.node, 0,TIVX_SWITCH_CHANNEL, refs1, 1u);
printf("App Send Command Done!\n");
break;
case 'l':
channel_prms.active_channel = 2;
vxCopyUserDataObject(switch_ch_obj, 0, sizeof(tivx_select_channel_t), &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
refs1[0] = (vx_reference)switch_ch_obj;
tivxNodeSendCommand(obj->imgMosaicObj.node, 0,TIVX_SWITCH_CHANNEL, refs1, 1u);
printf("App Send Command Done!\n");
break;
case 'r':
channel_prms.active_channel = 3;
vxCopyUserDataObject(switch_ch_obj, 0, sizeof(tivx_select_channel_t), &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
refs1[0] = (vx_reference)switch_ch_obj;
tivxNodeSendCommand(obj->imgMosaicObj.node, 0,TIVX_SWITCH_CHANNEL, refs1, 1u);
printf("App Send Command Done!\n");
break;
#endif
****************************************************************************************************************************************
static void update_img_mosaic_defaults(ImgMosaicObj *imgMosaicObj, vx_uint32 in_width, vx_uint32 in_height, vx_int32 numCh)
{
vx_int32 idx, ch;
vx_int32 in = 0;
imgMosaicObj->out_width = DISPLAY_WIDTH;
imgMosaicObj->out_height = DISPLAY_HEIGHT;
imgMosaicObj->num_inputs = 2;
idx = 0;
tivxImgMosaicParamsSetDefaults(&imgMosaicObj->params);
for(ch = 0; ch < numCh; ch++)
{
imgMosaicObj->params.windows[idx].startX = 0;
imgMosaicObj->params.windows[idx].startY = 0;
imgMosaicObj->params.windows[idx].width = 1244;
imgMosaicObj->params.windows[idx].height = 1080;
imgMosaicObj->params.windows[idx].input_select = 0;
idx++;
}
in++;
imgMosaicObj->params.windows[idx].startX = 1245;
imgMosaicObj->params.windows[idx].startY = 0;
imgMosaicObj->params.windows[idx].width = 670;
imgMosaicObj->params.windows[idx].height = 1080;
imgMosaicObj->params.windows[idx].input_select = in;
imgMosaicObj->params.windows[idx].channel_select = 0;
idx++;
in++;
imgMosaicObj->params.num_windows = idx;
imgMosaicObj->params.clear_count = 4;
}
Presently, I can get window[0] output as single cam index 0 and on the window[1] the SRV, but when I select the camera index for window[0] it does not switch.
Please suggest me the changes.
Thanks and Regards,
Vyom Mishra