How to obtain direction vector of objects from tracker in deepstream?

So I’ve been trying to setup opticalflow which is mentioned in the deepstream sample apps, but the issue is that when I proceed to run the sample it throws an error that,

Device does not support Optical flow functionality

Any idea how we could achieve the task of obtaining the direction vector which is supported on all machines?
I tried to run it on Jetson Nano and GTX device. Both the devices it threw the same error. I’m guessing it’s a feature only on RTX and Xavier device.

Can you run sample “sources/apps/sample_apps/deepstream-nvof-test”

And this sample: https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/anomaly

@ChrisDing, this is what I get when I run the sample app and the sample anamoly detection app,

Now playing: ./sample_720p.h264,
Device Number: 0
  Device name: GeForce GTX 1060
  Device Version 6.1
ERROR : Device Does NOT Supports Optical Flow Functionality

I get the same even if I run the sample apps on the Jetson Nano

Optical flow functionality is supported only on Jetson AGX Xavier and Turing GPUs T4 / RTX 2080 etc. It won’t work on Jetson Nano and GTX

I knew that part when I posted the question but is there a way we could have optical flow for these devices too?

opencv ?
https://docs.opencv.org/3.4/d4/dee/tutorial_optical_flow.html

Alright, will try it out @ChrisDing.

The ideal way of doing this would be to have a plugin? I’m not entirely sure but could you give a brief overview of the right way of doing it would be?

Yes. You can refer to gst-dsexample code. gst-nvof also uses transform_ip mode “gst_ds_optical_flow_transform_ip()”