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.

Any examples for sparse optical flow running on TDA4 DOF?

Hello,

I saw the introduction to the PDK(platform development kit) mentioned that  VHWA driver for DOF 'Supports Sparse optical flow' (in page 27 of VHWA_Overview slides).

Also in the 'PDK Documentation - Moduels - VHWA Driver - DOF Module', sparse optical flow can be set to enabled.

But i can't find any examples, neither any information in the TIOVX or application documents.

Could you please kindly provide some examples for the sparse optical flow running on DOF accelerator?

Thanks!

  • Documentation:

    - You can refer to TIOVX user guide, search tivxDmpacDofNode in the search box.

    - Hierarchically, it is TIOVX User  Guide -> APIs -> TIOVX APIs -> 1 TIOVX Public APIs -> TI OpenVX Extension APIs -> b Kernels -> TI DMPAC DOF.

    Example of TIOVX DOF Node using SOF mode:

    - tiovx/kernels_j7/hwa/test/test_dmpac_dof.c:testGraphProcessing (look for case where enable_sof == 1

  • Thank you! I'll try the example as you mentioned.

    I have another related question about feature extraction.

    Does any accelerator of TDA4 support sparse feature extraction (e.g. Harris corner)? Are there any examples?

    Thanks!

  • I've read this part of test code. But I didn't find any feature points data as inputs.

    Did I missed something important for such interface? 

    Does the SOF mode support tracking a list of input 2D points and giving a list of tracked 2D points as output?

    Thanks

  • jing wang1 said:
    Does any accelerator of TDA4 support sparse feature extraction (e.g. Harris corner)? Are there any examples?

    We don't have a dedicated accelerator for this like we have for dense optical flow, however there is a standard OpenVX node for Harris corners which TI has optimized to run on the C66 DSP.  You can search for vxHarrisCornersNode.

  • jing wang1 said:
    But I didn't find any feature points data as inputs.

    That is correct.  This accelerator is primarily a dense optical flow accelerator, meaning that it always computes the flow vectors for every input pixel in the input images.  The sparse optical flow mode of this accelerator relies on the user providing an input mask "sparse_of_map" to identify which flow vectors to send to output buffer.  It is not a list of feature points, it is formatted as a bitmask, wherein each bit corresponds a flow vector from the full image.  And the output is also not a feature list, it is a 2D flow vector image of flow vectors corresponding to the '1's in the input bitmask.

    Typically, this mode is used to reduce the bandwidth and memory requirements of the accelerator and to reduce the load on any downstream processing.  For example, if the algorithm only needs flow vectors for certain regions of interest in the image, or some pixels corresponding to some objects it found in the image.  I suppose you can run some kind of feature detector in another node, and program the input mask accordingly if that fits your needs, but I want to caution that there are some constraints on how the output is produced based on the "sparse_of_map".  Please read the details for the "sparse_of_config" parameter of this function (tivx_dmpac_dof_sof_params_t).

    jing wang1 said:
    Does the SOF mode support tracking a list of input 2D points and giving a list of tracked 2D points as output?

    As answered above, this accelerator does not use lists of features, but an input mask of pixels, and an output 2D "image" of feature points.

  • Thank you very much!

    Currently It seems that this can't meet our needs, which is similar to the 'calcopticalflowpyrlk' in OpenCV.

    The answer basically resolved my question now.

    And if you have any question to use the DOF accelerator for such 'calcopticalflowpyrlk' method, would you please kindly provide some further information?

    Regards.