TDA4VM: Why the capture node's output picture is not normal?

Part Number: TDA4VM

Tool/software:

Hi,

I'm using rewrite an app using the capture node, the camera is ar0233, and it seems ok, but when i write the output image of capture node,it seems that the capture node doesn't work normally. It output the picture like bellow,did i miss some configuration of the capture node?

  • more information:

    1.sensor set:

    vx_status set_front_cam_defaults(SensorObj *frontCam)
    {
    vx_status status = VX_SUCCESS;
    strcpy(frontCam->sensor_name, "AR0233_MAX9295_UYVY");
    frontCam->num_sensors_found = 0;
    frontCam->sensor_features_enabled = 0;
    frontCam->sensor_features_supported = 0;
    frontCam->sensor_dcc_enabled = 0;
    frontCam->sensor_wdr_enabled = 0;
    frontCam->sensor_exp_control_enabled = 0;
    frontCam->sensor_gain_control_enabled = 0;
    frontCam->ch_mask = 16;
    frontCam->enable_ldc = 0;
    frontCam->num_cameras_enabled = 1;
    frontCam->usecase_option = APP_SENSOR_FEATURE_CFG_UC0;
    frontCam->is_interactive = 0;
    frontCam->sensor_out_format = 1;

    status = app_querry_sensor(frontCam);

    return status;
    }

    2.

    Camera start ok.

    out function:

    vx_status status;

    status = vxGetStatus((vx_reference)img_arr);

    if (status == VX_SUCCESS)
    {
    FILE *fp = fopen(file_name, "wb");
    vx_size arr_len;
    vx_int32 i, j;

    if (fp == NULL)
    {
    printf("Unable to open file %s \n", file_name);
    return (VX_FAILURE);
    }

    vxQueryObjectArray(img_arr, VX_OBJECT_ARRAY_NUMITEMS, &arr_len, sizeof(vx_size));

    for (i = 0; i < arr_len; i++)
    {
    vx_rectangle_t rect;
    vx_imagepatch_addressing_t image_addr;
    vx_map_id map_id;
    void *data_ptr;
    vx_uint32 img_width;
    vx_uint32 img_height;
    vx_df_image df;
    vx_image out_img;
    vx_uint32 num_bytes = 0;

    out_img = (vx_image)vxGetObjectArrayItem(img_arr, i);

    vxQueryImage(out_img, VX_IMAGE_WIDTH, &img_width, sizeof(vx_uint32));
    vxQueryImage(out_img, VX_IMAGE_HEIGHT, &img_height, sizeof(vx_uint32));
    vxQueryImage(out_img, VX_IMAGE_FORMAT, &df, sizeof(vx_df_image));

    printf("[CAPTURE-NODE] writeCaptureNodeOutput image formate %d,width %d,image height %d.\n", df, img_width, img_height);
    if (df == VX_DF_IMAGE_UYVY)
    {

    rect.start_x = 0;
    rect.start_y = 0;
    rect.end_x = img_width;
    rect.end_y = img_height;
    status = vxMapImagePatch(out_img,
    &rect,
    0,
    &map_id,
    &image_addr,
    &data_ptr,
    VX_READ_ONLY,
    VX_MEMORY_TYPE_HOST,
    VX_NOGAP_X);

    /* Copy Luma */
    for (j = 0; j < img_height; j++)
    {
    num_bytes += fwrite(data_ptr, 1, img_width, fp);
    data_ptr += image_addr.stride_y;
    }

    if (num_bytes != (img_width * img_height))
    printf("Luma bytes written = %d, expected = %d\n", num_bytes, img_width * img_height);

    vxUnmapImagePatch(out_img, map_id);
    }

  • Hi cheng,

    Most likely, its not capturing anything and this is just dummy frame from the framework. 

    Can you please make sure that

    - CSIRX is configured with the correct number of lanes and lane ordering

    - CSIRX is configured with the correct datatype and virtual channel id

    - CSIRX is configured with the correct lane speed, which is matching with the output from deserializer

    - Output from deserializer is enabled only after PHY is configured and not before it. 

    Regards,

    Brijesh