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: One camera output at a time on display

Part Number: TDA4VM

Hi Team,

I'm using SDK v 08_02_00_05 (Linux+RTOS).

My application pipeline is as shown below.

Capture -> color_encoding -> LDC -> Mosaic -> Display

Color_encoding kernel is used to convert YUYV to UYVY as my camera output is in YUYV format.

The application uses 4 cameras and displays 4 camera mosaic view on display monitor. Now I need to display only one camera output on monitor and it should display the camera output of the selected camera by user input.

Note: Mosaic can't be removed, it is used in later stages of application.

Kindly guide me in achieving this.

Thanks,

Chaitanya Prakash Uppala

  • Hi Chaitanya,

    Our expert is currently out of office, please expect a delay in response. Thank you for your patience.

    Thanks,

    Neehar

  • Hi Chaitanya,

    You should remove Mosaic node from the above path to display only of the channel. The input channel can be selected in the Display node. You can even use Mosaic node later path, but for current requirement, it should be removed. 

    Regards,

    Brijesh

  • Hi Brijesh,

    You can even use Mosaic node later path,

    If I can use mosaic later part, why can't I use now itself? The application will be of same functionality "displaying one camera output at a time" then how can we use mosaic at that point of time? Can you explain this please.

     The input channel can be selected in the Display node.

    Using TIVX_DISPLAY_SELECT_CHANNEL right? If yes, let me know where can I modify that parameter?

    Thanks,

    Chaitanya Prakash Uppala

  • Hi,

    If I can use mosaic later part, why can't I use now itself? The application will be of same functionality "displaying one camera output at a time" then how can we use mosaic at that point of time?

    This is because Mosaic will merge all the input and i guess you are not looking for this feature. You just want to display one of the input channel and not the mosaic one. In this case, you can just remove mosaic node, or just dont connect mosaic output to display. Instead connect mosaic input to the display as well. 

    Using TIVX_DISPLAY_SELECT_CHANNEL right? If yes, let me know where can I modify that parameter?

    Yes, this is correct control command. You can refer to below file for the example parameter. 

    ti-processor-sdk-rtos-j721e-evm-09_00_00_02\video_io\kernels\video_io\test\test_capture_display.c

    Regards,

    Brijesh

  • Hi Brijesh,

    This is because Mosaic will merge all the input and i guess you are not looking for this feature. You just want to display one of the input channel and not the mosaic one. In this case, you can just remove mosaic node, or just dont connect mosaic output to display. Instead connect mosaic input to the display as well. 

    Yes, for the current requirement I want to display only one of the input channel. But later stages, I have to add many features which might require of mosaic node to display all the content at that point of time. So I was interested in displaying one channel output by keeping mosaic node. If there is a possibility to do that let me know.

    ti-processor-sdk-rtos-j721e-evm-09_00_00_02\video_io\kernels\video_io\test\test_capture_display.c

    I have gone through that, but not sure of how to implement it like in my application exactly where I need to add that either in app_init or app_verify_graph or app_create_graph etc.

    In app_srv_camera application TI using the same but instead of app_create_graph_display TI uses app_create_display to create display node and using that.

    Kindly  elaborate the correct implementing way for the same.

    Regards,

    Chaitanya Prakash Uppala

  • But later stages, I have to add many features which might require of mosaic node to display all the content at that point of time.

    You can always add mosaic node when it is really required.. 

    I have gone through that, but not sure of how to implement it like in my application exactly where I need to add that either in app_init or app_verify_graph or app_create_graph etc.

    In order to switch the channels, you dont need to update init, create or verify APIs. At runtime, you can call SELECT_CHANNEL control command to switch the input channel, as done in the below code snippet. This test implements the exact requirement. 

            /* Create User Data object for channel switching */
            channel_prms.active_channel_id = 0;
            ASSERT_VX_OBJECT(switch_ch_obj = vxCreateUserDataObject(context,
                "tivx_display_select_channel_params_t",
                sizeof(tivx_display_select_channel_params_t), &channel_prms),
                (enum vx_type_e)VX_TYPE_USER_DATA_OBJECT);
    
            refs[0] = (vx_reference)switch_ch_obj;
    

                if (0 == (loop_id % CHANNEL_SWITCH_FRAME_COUNT))
                {
                    channel_prms.active_channel_id =
                        (channel_prms.active_channel_id + 1) % num_channels;
                    VX_CALL(vxCopyUserDataObject(switch_ch_obj, 0,
                        sizeof(tivx_display_select_channel_params_t),
                        &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST));
                    VX_CALL(tivxNodeSendCommand(displayNode, 0,
                        TIVX_DISPLAY_SELECT_CHANNEL, refs, 1u));
                }
    

    Regards,

    Brijesh

  • Hello Brijesh,

    you dont need to update init, create or verify APIs

    Thanks for the information. Then where I need to add the above provided snippet. In app_run_graph?

    Thanks,

    Chaitanya Prakash Uppala

  • That's upto your usecase requirement, ie whenever you want to switch the display channel. But it needs to be called only after graph verification, ie after the call to vxVerifyGraph.

    Regards,

    Brijesh

  • Hi Brijesh,

    As per your suggestion I have removed mosaic node and added the snippet provided and I'm able to visualise the selected camera feed on display monitor. 

    Now when I enable the mosaic node as my further development of application needs the use of mosaic, I'm able to get the mosaic view displaying all camera feed on display. How can I modify the application to display only one selected camera feed should be displayed on monitor by keeping mosaic node in pipeline.

    kindly guide me the process that need to be followed in achieving this.

    Thanks,

    Chaitanya Prakash Uppala

  • Hi,

    Can we please keep only one ticket open for the same question?

    Regards,

    Brijesh

  • Sure. Closing this thread. As you haven't responded for a while raised new thread.