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: TDA4VM: TDA4 multi display capture image.

Part Number: TDA4VM


Hi, TI experts.

We are working on several cameras connect to CSIRX 96722 deserializes.  There are several combinations that we tried.

(we are using PSDK7.03)

case 1:  1 camera + 96722 with single_cam_example (works, image captured correctly and display correctly )

case 2: 4 camera + 96722 with multi_cam_example  (can save picture , but no display)    

As we use UYVY camera, we skipped all VISS, LDC nodes and configure a CSIRX -> DP display graph. 

And I was enable (obj->enable_mosaic = 1 ), bit it can save picture and can't display .

Please help me .

  • Hi,

    One question, are all 4 cameras able to capture images? Could you please confirm it?

    Also from which node are you saving images? 

    Regards,

    Brijesh 

  • Hi, 

    1.I found " Failed to Submit Request "error log ,Please help me analyze the reasons. 

         [MCU2_0] 44.460499 s: VX_ZONE_WARNING:[tivxCaptureSetTimeout:763] CAPTURE: WARNING: Error frame not provided using               tivxCaptureRegisterErrorFrame, defaulting to waiting forever !!!
         app_run_graph_for_one_pipeline: frame 3 beginning
         [MCU2_0] 44.526133 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
         app_run_graph_for_one_pipeline: frame 4 beginning
         [MCU2_0] 44.559236 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request

    2.One question, are all 4 cameras able to capture images? Could you please confirm it?

    ====> Yes,I have confirmed that the four cameras are working and they can all save pictures in multt.out 

    3.Also from which node are you saving images? 

    ===> I was add a function for multi.out ,The code is as follows,

    void save_debug_images(AppObj *obj)
    {
    int num_bytes_io = 0;
    static int file_index = 0;
    char raw_image_fname[MAX_FNAME];
    //char yuv_image_fname[MAX_FNAME];
    char failsafe_test_data_path[3] = "./";
    char * test_data_path = app_get_test_file_path();
    struct stat s;
    int i = 0;
    if(NULL == test_data_path)
    {
    printf("Test data path is NULL. Defaulting to current folder \n");
    test_data_path = failsafe_test_data_path;
    }

    if (stat(test_data_path, &s))
    {
    printf("Test data path %s does not exist. Defaulting to current folder \n", test_data_path);
    test_data_path = failsafe_test_data_path;
    }

    for(i=0; i<4;i++)
    {
    vx_image cap_yuv;
    snprintf(raw_image_fname, MAX_FNAME, "%s/%s_%04d_%04d.yuv", test_data_path, "cap_",i, file_index);
    printf("YUV file name %s \n", raw_image_fname);
    cap_yuv = (vx_image)vxGetObjectArrayItem(obj->captureObj.raw_image_arr[0], i);
    num_bytes_io = write_output_image_yuv422_8bit(raw_image_fname, cap_yuv);
    if(num_bytes_io < 0)
    {
    printf("Error writing to YUV file \n");
    }
    }
    }

    Log:


    J7EVM@QNX:/ti_fs/vision_apps# run_app_multi_cam.sh
    APP: Init QNX ... !!!
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
    28.816117 s: REMOTE_SERVICE: Init ... !!!
    28.816310 s: myAllocEp : 41
    28.816332 s: REMOTE_SERVICE: Init ... Done !!!
    28.816360 s: IPC Remote APP : Expected End point or Processor responded!!!
    IpcRemoteApp_TxRx
    28.816382 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    28.816420 s: VX_ZONE_INIT:Enabled
    28.816434 s: VX_ZONE_ERROR:Enabled
    28.816447 s: VX_ZONE_WARNING:Enabled
    28.816643 s: VX_ZONE_INIT:[tivxInit:71] Initialization Done !!!
    28.816678 s: VX_ZONE_INIT:[tivxHostInit:48] Initialization Done for HOST !!!
    I2C Switch: '0' for SOC1, '1' for SOC2
    32.559828 s: ISS: I2C_Switch [0] ... !!!
    32.560033 s: ISS: I2C_Switch [0] done !!!
    32.560065 s: ISS: Enumerating sensors ... !!!
    [MCU2_0] 32.560134 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CREATE
    32.759834 s: ISS: Enumerating sensors ... found 0 : MAX96722_MAX96717_OX03C10
    32.759906 s: ISS: Enumerating sensors ... found 1 : MAX96722_MAX96717_X1F
    2 sensor(s) found
    Supported sensor list:
    a : MAX96722_MAX96717_OX03C10
    b : MAX96722_MAX96717_X1F
    Select a sensor above or press '0' to autodetect the sensor
    Invalid selection 169. Try again
    2 sensor(s) found
    Supported sensor list:
    a : MAX96722_MAX96717_OX03C10
    b : MAX96722_MAX96717_X1F
    Select a sensor above or press '0' to autodetect the sensor
    b
    Sensor selected : MAX96722_MAX96717_X1F
    Querying MAX96722_MAX96717_X1F
    34.447483 s: ISS: Querying sensor [MAX96722_MAX96717_X1F] ... !!!
    34.447767 s: ISS: Querying sensor [MAX96722_MAX96717_X1F] ... Done !!!
    LDC Selection Yes(1)/No(0)
    Invalid selection
    . Try again
    LDC Selection Yes(1)/No(0)

    0
    [MCU2_0] 34.447587 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_QUERY
    [MCU2_0] 34.447656 s: Received Query for MAX96722_MAX96717_X1F
    Max number of cameras supported by sensor MAX96722_MAX96717_X1F = 4
    Please enter number of cameras to be enabled
    Invalid selection
    . Try again
    Max number of cameras supported by sensor MAX96722_MAX96717_X1F = 4
    Please enter number of cameras to be enabled

    4

    Camera Combo Select: '0' for Front-Wide/Left-Rear/Right-Rear, '1' for Front-Narrow/Left-Front/Right-Front, '2' for All six X3C, '3' for X1F
    Invalid selection
    . Try again
    Camera Combo Select: '0' for Front-Wide/Left-Rear/Right-Rear, '1' for Front-Narrow/Left-Front/Right-Front, '2' for All six X3C, '3' for X1F
    3
    YUV Input selected. VISS, AEWB and Mosaic nodes will be bypassed.
    app_update_param_set num_cameras_enabled=4,obj->sensorObj.image_width =1280,obj->sensorObj.image_height = 960 resized_width = 1440, resized_height = 1080
    Creating context done!
    Kernel loading done!
    42.192455 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F], doing IM_SENSOR_CMD_PWRON ... !!!
    [MCU2_0] 42.192562 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_PWRON
    [MCU2_0] 42.192629 s: IM_SENSOR_CMD_PWRON : channel_mask = 0xf
    [MCU2_0] 42.192715 s: x1f_StreamOn
    [MCU2_0] 42.192752 s: x1f_StreamOn config
    [MCU2_0] 42.501464 s: x1f_StreamOn
    [MCU2_0] 42.501530 s: x1f_StreamOn config
    [MCU2_0] 42.810458 s: x1f_StreamOn
    [MCU2_0] 42.810526 s: x1f_StreamOn config
    [MCU2_0] 43.119460 s: x1f_StreamOn
    [MCU2_0] 43.119524 s: x1f_StreamOn config
    43.428499 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F], doing IM_SENSOR_CMD_CONFIG ... !!!
    43.428920 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F] ... Done !!!
    Sensor init done!
    Img Mosaic init done!
    Display init done!
    App Init Done!
    Graph create done!
    Capture graph done!
    Img Mosaic graph done!
    Display graph done!
    Pipeline params setup done!
    App Create Graph Done!
    [MCU2_0] 43.428648 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CONFIG
    [MCU2_0] 43.428740 s: Application requested features = 0x120
    [MCU2_0] 43.428777 s: Configuring camera # 0
    [MCU2_0] 43.428799 s: Configuring camera # 1
    [MCU2_0] 43.428818 s: Configuring camera # 2
    [MCU2_0] 43.428835 s: Configuring camera # 3
    [MCU2_0] 43.428853 s: IM_SENSOR_CMD_CONFIG returning status = 0
    [MCU2_0] 43.431631 s: VX_ZONE_ERROR:[tivxCaptureExtractDataFormat:531] format = FVID2_DF_YUV422I_UYVY !!!
    [MCU2_0] 43.431746 s: VX_ZONE_ERROR:[tivxCaptureExtractDataFormat:531] format = FVID2_DF_YUV422I_UYVY !!!
    [MCU2_0] 43.431795 s: VX_ZONE_ERROR:[tivxCaptureExtractDataFormat:531] format = FVID2_DF_YUV422I_UYVY !!!
    [MCU2_0] 43.431837 s: VX_ZONE_ERROR:[tivxCaptureExtractDataFormat:531] format = FVID2_DF_YUV422I_UYVY !!!
    Graph verify done!
    App Verify Graph Done!
    App Send Error Frame Done!
    app_pipeline_params_defaults returned
    44.457126 s: ISS: Starting sensor [MAX96722_MAX96717_X1F] ... !!!
    44.459854 s: ISS: Starting sensor [MAX96722_MAX96717_X1F] ... !!!
    appStartImageSensor returned with status: 0
    app_run_graph_for_one_pipeline: frame 0 beginning
    app_run_graph_for_one_pipeline: frame 1 beginning
    app_run_graph_for_one_pipeline: frame 2 beginning


    =========================
    Demo : Camera Demo
    =========================

    s: Save CSIx, VISS and LDC outputs

    t: multi_cam Save picture

    p: Print performance statistics

    x: Exit

    Enter Choice:


    =========================
    Demo : Camera Demo
    =========================

    s: Save CSIx, VISS and LDC outputs

    t: multi_cam Save picture

    p: Print performance statistics

    x: Exit

    Enter Choice: [MCU2_0] 44.457332 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_STREAM_ON
    [MCU2_0] 44.457424 s: IM_SENSOR_CMD_STREAM_ON: channel_mask = 0xf
    [MCU2_0] 44.457460 s: IssSensor_Start before
    [MCU2_0] 44.457481 s: pSensorHandle->sensorFxns->streamOn before
    [MCU2_0] 44.457527 s: x1f_StreamOn
    [MCU2_0] 44.457559 s: x1f_StreamOn start
    [MCU2_0] 44.458036 s: x1f_StreamOn check
    [MCU2_0] 44.458070 s: x1f_StreamOn end
    [MCU2_0] 44.458090 s: pSensorHandle->sensorFxns->streamOn before
    [MCU2_0] 44.458119 s: x1f_StreamOn
    [MCU2_0] 44.458140 s: x1f_StreamOn start
    [MCU2_0] 44.458602 s: x1f_StreamOn check
    [MCU2_0] 44.458626 s: x1f_StreamOn end
    [MCU2_0] 44.458643 s: pSensorHandle->sensorFxns->streamOn before
    [MCU2_0] 44.458671 s: x1f_StreamOn
    [MCU2_0] 44.458713 s: x1f_StreamOn start
    [MCU2_0] 44.459179 s: x1f_StreamOn check
    [MCU2_0] 44.459203 s: x1f_StreamOn end
    [MCU2_0] 44.459223 s: pSensorHandle->sensorFxns->streamOn before
    [MCU2_0] 44.459252 s: x1f_StreamOn
    [MCU2_0] 44.459271 s: x1f_StreamOn start
    [MCU2_0] 44.459734 s: x1f_StreamOn check
    [MCU2_0] 44.459763 s: x1f_StreamOn end
    [MCU2_0] 44.459780 s: IssSensor_Start end
    [MCU2_0] 44.460499 s: VX_ZONE_WARNING:[tivxCaptureSetTimeout:763] CAPTURE: WARNING: Error frame not provided using tivxCaptureRegisterErrorFrame, defaulting to waiting forever !!!
    app_run_graph_for_one_pipeline: frame 3 beginning
    [MCU2_0] 44.526133 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 4 beginning
    [MCU2_0] 44.559236 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 5 beginning
    [MCU2_0] 44.592577 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 6 beginning
    [MCU2_0] 44.626042 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 7 beginning
    [MCU2_0] 44.643526 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 8 beginning
    [MCU2_0] 44.676930 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 9 beginning
    [MCU2_0] 44.710545 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 10 beginning
    [MCU2_0] 44.743539 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 11 beginning
    [MCU2_0] 44.776933 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 12 beginning
    [MCU2_0] 44.810559 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request
    app_run_graph_for_one_pipeline: frame 13 beginning
    [MCU2_0] 44.843577 s: VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:978] Failed to Submit Request

  • Hi,

    But this error is coming Scalar/Mosaic node, which does not support YUV422 format. You will need to first convert it into YUV420 format. then mosaic can be enabled. 

    How are you connecting YUV sensor output to MSC? 

    Regards,

    Brijesh

  • Thank you for your reply.

    csrix->ldc->mosaic ->display .

    I was  just tried enable mosaic and enable LDC. i  can display image that   remove this function( configure_mesh_params ) in app_ldc_module.c , so  Does LDC have the function of format conversion ? And the  configure_mesh_params functions does params function do? Is it feasible to remove it?
    static vx_status configure_mesh_params(vx_context context, LDCObj *ldcObj, SensorObj *sensorObj)
    {
    vx_status status = VX_SUCCESS;
    vx_uint32 table_width_ds, table_height_ds;
    vx_imagepatch_addressing_t image_addr;
    vx_rectangle_t rect;

    table_width_ds = (((ldcObj->table_width / (1 << ldcObj->ds_factor)) + 1u) + 15u) & (~15u);
    table_height_ds = ((ldcObj->table_height / (1 << ldcObj->ds_factor)) + 1u);

    /* Mesh Image */
    ldcObj->mesh_img = vxCreateImage(context, table_width_ds, table_height_ds, VX_DF_IMAGE_U32);
    status = vxGetStatus((vx_reference)ldcObj->mesh_img);

    if(status == VX_SUCCESS)
    {
    /* Copy Mesh table */
    rect.start_x = 0;
    rect.start_y = 0;
    rect.end_x = table_width_ds;
    rect.end_y = table_height_ds;

    image_addr.dim_x = table_width_ds;
    image_addr.dim_y = table_height_ds;
    image_addr.stride_x = 4u;
    image_addr.stride_y = table_width_ds * 4u;

    status = vxCopyImagePatch(ldcObj->mesh_img,
    &rect, 0,
    &image_addr,
    g_ldc_lut,
    VX_WRITE_ONLY,
    VX_MEMORY_TYPE_HOST);
    if (status == VX_SUCCESS)
    {
    /* Mesh Parameters */
    memset(&ldcObj->mesh_params, 0, sizeof(tivx_vpac_ldc_mesh_params_t));

    tivx_vpac_ldc_mesh_params_init(&ldcObj->mesh_params);

    ldcObj->mesh_params.mesh_frame_width = ldcObj->table_width;
    ldcObj->mesh_params.mesh_frame_height = ldcObj->table_height;
    ldcObj->mesh_params.subsample_factor = ldcObj->ds_factor;

    ldcObj->mesh_config = vxCreateUserDataObject(context, "tivx_vpac_ldc_mesh_params_t", sizeof(tivx_vpac_ldc_mesh_params_t), NULL);
    status = vxGetStatus((vx_reference)ldcObj->mesh_config);

    if(status == VX_SUCCESS)
    {
    status = vxCopyUserDataObject(ldcObj->mesh_config, 0,
    sizeof(tivx_vpac_ldc_mesh_params_t),
    &ldcObj->mesh_params,
    VX_WRITE_ONLY,
    VX_MEMORY_TYPE_HOST);
    if(status != VX_SUCCESS)
    {
    printf("[LDC-MODULE] Unable to copy mesh params into buffer! \n");
    }
    }
    else
    {
    printf("[LDC-MODULE] Unable to create mesh config object! \n");
    }
    }
    else
    {
    printf("[LDC-MODULE] Unable to copy mesh image! \n");
    }
    }
    else
    {
    printf("[LDC-MODULE] Unable to create mesh image! \n");
    }
    return status;
    }
  • Hi,

    Yes, LDC can do YUV422 to YUV420 conversion and it is ok to remove mesh parameters, it is used only when you want to distortion correction. Otherwise LDC can alone be used for YUV422 to YUV420 conversion.

    Regards,

    Brijesh