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: How to connect a node with 4 array to a node with 1 array in pipeline

Part Number: TDA4VM
Hello experts,
   I'm trying to design a pipeline which include 2  nodes. The first node's output  is the input of the second node.
   But the first node process 4 images, while the second node only process one of the images from the first note output.
   by this case, we just connect node 1 to node 2 , and use "replicate" in node 1 but don't use "replicate" in node, we can realize  this requirement.
   But, by this method, node 2 can only process the first image from node 1, bu we want node 2 to process the second image from node 1 array.
   Thus  we did some test, as below, seems not work well. Do you have any suggestion ?
vx_image in_img_1 = (vx_image)vxGetObjectArrayItem((vx_object_array) out_arr , 0);
to extract the first image from the first node array output, the pipeline is running well.
 
However, When I use
vx_image in_img_1 = (vx_image)vxGetObjectArrayItem((vx_object_array) out_arr , 1);
to extract the second image from the first node's array output, the pipeline is blocked at a dequeue function.
 
  • Hi,

    Few followup questions to understand the setup better.

    1. As per your flowchart, you have 3 nodes right? i.e., LDC, MscPyramid and tivxImgPreProc

    2. May I know what is the flow here? Should all 4 outputs of LDC should be processed by both the nodes?

    3. If yes, you could do replicate node to the MscPyramid and tivxImgPreProc nodes and pass the first instance vxGetObjectArrayItem((vx_object_array) out_arr , 0);

        If not, may I know why you want to send only first instance to MscPyramid?

    Regards,

    Nikhil

  • Hi, Nikhil,

    Here is the details about your question:

    1. Actually, there are more than 3 nodes in my whole pipeline. I only show you the middle part in which there exists a modification( the index with blue color).

    2. We have tried to process the 4 outputs of LDC in all the nodes with replicating. And that works when we disable other pipeline. Because of the HW resource (memory resource)limitation of our system, we have to choose one image to compute the dense optical flow (showing in the left branch).

    3. Please refer to A2's response

    Thank you.

  • Hi,

    Understood, You are sending all 4 LDC output to preproc node whereas you want to send only  vxGetObjectArrayItem((vx_object_array) out_arr , 1); to MscPyramid.

    When you are sending vxGetObjectArrayItem((vx_object_array) out_arr , 0); to MscPyramid, it works fine

    whereas if you send vxGetObjectArrayItem((vx_object_array) out_arr , 1); to MscPyramid, it doesn't work.

    Is this correct?

    If yes, I'm suspecting, this could be because how you have given the graph parameters. Could you please confirm if you have given the 0th instance or 1st instance as graph parameter ref_list for MscPyramid node? You should give the 1st instance if you want to send

    vxGetObjectArrayItem((vx_object_array) out_arr , 1);

    Regards,

    Nikhil

  • Hello, Nikhil,

           Thanks for your reply .

           We did some test in the past few days, we create a different graph  for the nodes on the backend  and connect to the second object of the frontend node.

           And It works.