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.

PROCESSOR-SDK-J721S2: Error message after modifying node input parameters

Part Number: PROCESSOR-SDK-J721S2

Tool/software:

Hi TI expert,

      I changed the third parameter of PixelVizNode from `vx_image in_img` to `vx_user_data_object od_data`, and the error message is as follows:

      

      The od_data to be passed into the node here stores my`byd_interfaces_cam_od_list`(See pdf for details), so I suspect that there is a problem in the step of converting the custom structure `byd_interfaces_cam_od_list` to `vx_user_data_object od_tensor`.

      The following pdf is the part I modified, please help me find the problem.

      change part.pdf

  • Hi Wang,

    Have you managed to change the function tivxAddKernelPixelViz() in the file $(psdkra)/vision_apps/kernels/img_proc/host/tivx_pixel_visualization_host.c

    and also you have to modify the target kernel which is $(psdkra)/vision_apps/kernels/img_proc/c66/vx_pixel_visualization_target.c

    You have to change wherever this parameter is used inside the kernel_process function, by default it will be type_casted to image type.

    you have to modify this to process the user_data_object instead of image object.

    Regards,
    Gokul

  • Thank you very much for your reply! I have modified the part you mentioned, but still get the error `VX_ZONE_ERROR:[vxReplicateNode:2020] Invalid reference type` . 

    According to the log of the error screenshot below , We can see that I have successfully executed the `tivxAddKernelPixelViz` part in `tivx_pixel_visualization_host.c` , and the error is reported at the `vxReplicateNode`  of `app_post_proc_moudle.c -> app_create_graph_post_proc` .

    The following are screenshots of the parts I modified. Please check if there are any omissions or errors.Thank you very much for your review!

    1. app_post_proc_moudle.c

    2. kernels/img_proc/host/tivx_pixel_visualization_host.c

    3. kernels/img_proc/host/tivx_img_proc_node_api.c

    4. kernels/img_proc/c66/vx_pixel_visualization_target.c

  • Hi Wang,

    If you want to replicate a parameter then it should be an element of object array. So you should create an object_array of user_data_object and then take 0th element of the object array and give it to node.

    Refer to the the previous case where input_image is given from input_image_arr similarly you create for your user_data_object.

    Regards,
    Gokul

  • Thank you very much for your reply! 

    I understand what you mean, but my data is stored in a custom structure `byd_interfaces_cam_od_list`(As shown in the figure below), and I don't know how to put it into vx_object_array.

    I searched the document and tried the following methods(As shown in the figure below), but still got an error `VX_ZONE_ERROR:[vxReplicateNode:2020] Invalid reference type`.

    Is there a simple example of putting data from a custom structure into vx_object_array or vx_array?

  • Hi Wang,

    You can see the postProcObj->output_image_arr creation part as a reference,
    instead of crteating postProcObj->vx_od_data create postProcObj->vx_od_data_arr of type vx_object_array
    and then follow the snippet,

    vx_user_data_object od_data = vxCreateUserDataObject( context, "some_name", sizeof(byd_itnerfaces_cam_od_list), NULL);
    postProcObj->vx_od_data_arr = vxCreateObjectArray(context, (vx_reference)od_data, NUM_CH);
    status = vxReleaseUserDataObject(&od_data);
    

    and then in the app_create_graph function
    do the similar thing done for input_image_arr for your vx_od_data_arr

    Regards,
    Gokul