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.

Trying to learn more about OpenVX and TIOVX



Hi TI experts,

I have few questions regarding the OpenVX and TIOVX and I hope that I can understand it to the maximum extent as I am a noob to this thing.

1. How to access the values from different Openvx defined variable, i.e. vx_matrix, vx_image and so on. Any specific values of the matrix or the pixel value of the vx_image using C.

2. How to connect the output of one graph to the input of another?

3. The targets for tiovx and openvx APIs are different, is it necessary to specify the target when we test on the host emulation?

4. The general structure for testing any OpenVX or TIOVX based API, as per my understanding, is this: Create context -> Create Graph ->  Call Registered Node (define and insert all the required values) ->Verify Graph ->Release Objects -> Release Graph and Release Context. Is there any difference between the both API? For defined Node, we need to make sure that the kernels are loaded and unloaded before the context is released.  

5. What are the current best libraries supported on tda4 for the image processing?

  • Hafiz,

    Most of these questions are generic to OpenVX. I recommend you to refer to the OpenVX specification.  You can spend some time in the spec, and also refer to the "resources" tab in the TIOVX user guide.  It has links to web tutorials as well to ramp up on OpenVX usage.  TI uses version 1.1 of the OpenVX spec:

    I will give some quick guidance here:

    Hafiz Muhammad Owais said:
    1. How to access the values from different Openvx defined variable, i.e. vx_matrix, vx_image and so on. Any specific values of the matrix or the pixel value of the vx_image using C.

    These data object functions are opaque handles, which each have respective data access functions defined in OpenVX spec.  (ie. vx_image has vxCopyImagePatch and vxMapImagePatch, as 2 ways to get access to the data.  Each of these functions are defined in the spec.

    Hafiz Muhammad Owais said:
    2. How to connect the output of one graph to the input of another?

    The output of one graph is going to be a data object.  Data objects are created within the context, so you can simply pass the output data object of one graph to be the input data object to another graph.  For more complicated situations where you want more control over syncronizing rates of the graphs, you can use graph parameters (see the spec) and enque/deque them if using pipelining extension (see pipelining extension spec).

    Hafiz Muhammad Owais said:
    3. The targets for tiovx and openvx APIs are different, is it necessary to specify the target when we test on the host emulation?

    When you say "specify the target" I assume you mean call the vxNodeSetTarget() function.  If you don't specify the target, the framework will default to one of the ones that are supported.  Specifying the target is only needed when you want to optimize and ensure some nodes happen in parallel on different targets.

    Hafiz Muhammad Owais said:
    4. The general structure for testing any OpenVX or TIOVX based API, as per my understanding, is this: Create context -> Create Graph ->  Call Registered Node (define and insert all the required values) ->Verify Graph ->Release Objects -> Release Graph and Release Context. Is there any difference between the both API? For defined Node, we need to make sure that the kernels are loaded and unloaded before the context is released.  

    After verify graph, you typically run the graph via vxProcessGraph, or vxScheduleGraph, otherwise, this looks correct.  When you say "Is there any difference between the both API?" which API are you referring to?

    Hafiz Muhammad Owais said:
    5. What are the current best libraries supported on tda4 for the image processing?

    Please refer to the TIOVX user guide to show list of available OpenVX kernels.  The SDK comes packaged with these.  Other C66 libraries from legacy chips can also run on TDA4 (like VLIB, IMGLIB), but they are not pacakged with the SDK.  You are free to link and call them yourself if you like, and if you want to use OpenVX to access them, you will need to create a kernel wrapper around them, by following the instructions in the TIOVX user guide related to "Custom Target User Kernels"

    Regards,

    Jesse