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.

TDA4VH-Q1: Creating an object array from multiple object arrays

Part Number: TDA4VH-Q1


Tool/software:

Hi,

I'm working on integrating the default SRV node into my application using SDK version 9.2(QNX). In my setup, each camera has its own graph, and I want to pass the VISS output from these graphs to the SRV node. However, the SRV node only accepts a single object array, while I currently have separate object arrays for each camera. Is there a way to combine these different object arrays into a single array that can be sent to the SRV node? 

I have multiple object arrays standing in different graphs and would like to read all these arrays into a single object array and send it to the SRV node.

  • Hi Rishitha,

    I currently have separate object arrays for each camera. Is there a way to combine these different object arrays into a single array that can be sent to the SRV node? 

    I suppose that should be doable with openvx.

    Could you please share some code snippet for the arrays on each side?
    That will help me find someone who can answer the question for you.

  • Hi Gang Hua,

    Thank you for your response. I have attached the relevant code snippets for both sides.

    In the first image, you can see that we have five separate object arrays, each corresponding to a different camera. These arrays are being assigned to an array of arrays (srv_input_frames). However, the SRV node only accepts a single object array that contains multiple items, as shown in the second image.

    Could you please advise on how we can combine these five individual object arrays (each containing a single item) into one object array with five items, so that it can be passed to the SRV node?

  • Hi Rishitha,

    Thanks for sharing the details!

    Let me transfer the question to a s/w expert of the SRV demo.

  • Hi,

    Few APIs below that could be of use to you.

    vxGetObjectArrayItem() -> to get the vx_image from object array

    vxQueryObjectArray() -> to get number of items in an object array

    One way I see is as shown below

    Now what you could do here will be to create an object array of size 4 (this would be the input of SRV node)

    then extract each reference images using vxGetObjectArrayItem(), So now you will have 4 vx_images. Now you can create 4 individual object_arrays with these and pass this to source nodes

    Regards,

    Nikhil

  • Hi Nikhil,

    We have a different scenario, as shown in the below image. In this setup, we have five separate graphs, each corresponding to a different camera. From each graph, we are extracting the VISS output, which is a single object array for each camera.

    Additionally, we have a separate graph for the SRV, which includes an SRV node. Our objective is to merge the five object arrays from the camera graphs into a single array, containing five items—one for each camera, as shown in the image. This merged array will then be sent to the SRV node.

    We would like to understand how the merging process (highlighted in red in the image) is implemented.

  • Hi,

    In this case, you can refer to the node tivxObjArraySplitNode() which takes in 1 object array and splits into 4 different subset object arrays. (Kinda opposite of want you are doing)

    and create a custom node referring to this which does the opposite.

    The target implementation of this node can be found in tiovx/kernels/openvx-ext/target/vx_obj_array_split_target.c

    Regards,

    Nikhil