This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM-Q1: Multigraph with Multi-view Application

Part Number: TDA4VM-Q1

Tool/software:

Dear Sir,

I am working on an application with two graphs ( Semantic Segmentation + SVM) running simultaneously. I have successfully implemented that. Please find the reference below for understanding the layout.

I am using a mosaic node to divide the display, but looking for a selectable camera view on the left side graph i.e., Semantic Segmentation graph only through keyboard input.

Could you please suggest and help with this?

PSDK : 8.2

OS : Linux RTOS

Thanks and Regards,

Vyom Mishra

  • Hi Vyom,

    What is the input to the mosaic node currently? Is it only one cam on left and srv on the other?

    I am using a mosaic node to divide the display, but looking for a selectable camera view on the left side graph i.e., Semantic Segmentation graph only through keyboard input.

    Could you elaborate here?

    Regards,

    Nikhil

  • Hi Sir,

    Input to the mosaic is both SD and SVM.

    Yes, I have passed index 0 to the left side graph(SD), and SRV is working on the other side.

        vx_int32 idx = 0;
        obj->imgMosaicObj.input_arr[idx++] = obj->postProcObj.output_image_arr;
    #ifdef SRV
        obj->imgMosaicObj.input_arr[idx++] =  obj->srvobj.out_arr;
    #endif

    Thanks and Regards,

    Vyom Mishra

  • Hi Vyom,

    obj->imgMosaicObj.input_arr[idx++] = obj->postProcObj.output_image_arr;

    You are passing an object array here. Does this mean that mosaic node has all 4 sensor data in the first channel, but you are not providing that output?

    May I know what is your required usecase?

    Regards,

    Nikhil

  • Hi Sir,

    Thanks for the quick response!

    You are passing an object array here. Does this mean that mosaic node has all 4 sensor data (YES) in the first channel, but you are not providing that output? 

    I am passing an object array from post-processing of Semantic Segmentation to the first window which has all four sensor processed data, I am assuming that in the selection of one of the sensors , it should display one camera output to the display by selecting one view through keyboard input without affecting the SRV on the right side.

    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 grid_size = calc_grid_size(numCh);
    
        imgMosaicObj->out_width    = DISPLAY_WIDTH;
        imgMosaicObj->out_height   = DISPLAY_HEIGHT;
        imgMosaicObj->num_inputs   = 1;
    
        idx = 0;
    
        tivxImgMosaicParamsSetDefaults(&imgMosaicObj->params);
    
        for(ch = 0; ch < numCh; ch++)
        {
            vx_int32 winX = ch%grid_size;
            vx_int32 winY = ch/grid_size;
    
            imgMosaicObj->params.windows[idx].startX  = (winX * (in_width/grid_size));//350;
            imgMosaicObj->params.windows[idx].startY  = (winY * (in_height/grid_size)); //178;
            imgMosaicObj->params.windows[idx].width   = in_width/grid_size;
            imgMosaicObj->params.windows[idx].height  = in_height/grid_size;
            imgMosaicObj->params.windows[idx].input_select   = 0;
            idx++;
        }
    
        imgMosaicObj->params.num_windows  = idx;
    
        /* Number of time to clear the output buffer before it gets reused*/
        imgMosaicObj->params.clear_count  = APP_BUFFER_Q_DEPTH;
    }

    please let me know how to pass input to the mosaic for my usecase.

    May I know what is your required usecase?

    I am using a mosaic node to divide the display, but looking for a selectable camera view on the left side graph i.e., Semantic Segmentation graph only through keyboard input and SRV on right side

    Thanks and Regards,

    Vyom Mishra

  • Dear Sir,

    Latest Update!

    I am able to implement the selectable camera view for the left graph. initially the default sensor index 0 is reflected on display with SRV but when I press key for switching the active channel for left side graph i.e., Semantic Segmentation, it displays two copy of semantic segmentation output one on left side other second one on top of SRV.

    Thanks and Regards,

    Vyom Mishra

  • Hi Vyom,

    but when I press key for switching the active channel

    May I know how have you implemented this?

    Regards,

    Nikhil

  • Dear Sir,

    Also enabled "tivxKernelImgMosaicMscControl" in the img_proc node present in the R5F folder

    Thanks and Regards,

    Vyom Mishra

  • Hi,

    The mosaic has all the 4 images already in the target implementation (unlike display node which had only one, and then you had to switch using the control command)

    Can you show be what is the changes that you did in the target side to achieve this in mosaic node?

    Regards,

    Nikhil

  • Dear Sir,

    My expectation is, that when I switch the camera it should have only one output displayed with a mosaic instead of two copies. Is it happening due to two inputs to gthe raph?

    How can it be resolved? Please guide for the same.

    Thanks and Regards,

    Vyom Mishra

  • Ok,

    So you are modifying channel_select here.

    So can you create only 2 windows (i.e. idx = 2 in imgMosaicObj->params.windows[idx]) and then do the same what you are doing now?

    i.e. 1 window for The cam and 2nd window for SRV

    Regards,

    Nikhil

  • Hi Sir,

    I have already tried that, below error is faced during the pressing of the other camera key

     Enter Choice: [MCU2_0]     61.493940 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvPrepare:1034] Fvid2_control Failed: Set Params
    [MCU2_0]     61.527404 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvPrepare:1034] Fvid2_control Failed: Set Params
    

    Thanks and Regards,

    Vyom Mishra

  • Hi Sir,

    Any suggestions to resolve this multi-output of the selectable view?

    Thanks and Regards,

    Vyom Mishra

  • Hi Vyom,

    I see that you have clicked the issue as resolved. Did you resolve this issue?

    Regards,

    Nikhil

  • Hi Sir,

    I have manipulated the Mosaic target code by informing it to be a single input instead of 2 , this resolved the issue

    Thanks and Regards,

    Vyom Mishra