AI-IOT Deepstream_Reference_Apps gst_dsoptical flow Build Error

Hi,

I am working on a Jetson Xavier and am trying to build the anomaly application listed here:
https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/anomaly

I managed to build the deepstream-yolo app and run it fine; however, when I tried to build the dsoptical plugin for the anomaly app, I get this error:

[ 80%] Building CXX object CMakeFiles/gstdsopticalflow.dir/gstdsopticalflow.cpp.o
/home/nvidia/deepstream_reference_apps/anomaly/plugins/gst-dsopticalflow/gstdsopticalflow.cpp: In function ‘GstFlowReturn gst_ds_optical_flow_transform_internal(GstBaseTransform*, GstBuffer*, GstBuffer*)’:
/home/nvidia/deepstream_reference_apps/anomaly/plugins/gst-dsopticalflow/gstdsopticalflow.cpp:488:13: error: ‘CHECK_NVDS_MEMORY_AND_GPUID’ was not declared in this scope
         if (CHECK_NVDS_MEMORY_AND_GPUID (dsopticalflow, surface))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nvidia/deepstream_reference_apps/anomaly/plugins/gst-dsopticalflow/gstdsopticalflow.cpp:506:80: error: ‘NvBufSurface {aka struct _NvBufSurface}’ has no member named ‘buf_data’; did you mean ‘buf_fds’?
 (DsOpticalFlowProcess(dsopticalflow->dsopticalflowlib_ctx, surface->buf_data[0],
                                                                     ^~~~~~~~
                                                                                buf_fds
CMakeFiles/gstdsopticalflow.dir/build.make:62: recipe for target 'CMakeFiles/gstdsopticalflow.dir/gstdsopticalflow.cpp.o' failed
make[2]: *** [CMakeFiles/gstdsopticalflow.dir/gstdsopticalflow.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gstdsopticalflow.dir/all' failed
make[1]: *** [CMakeFiles/gstdsopticalflow.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

How would I go about fixing this so I can run the application? I have OpenCV 4.0.1 built with contrib as explained in the readme. Is there something wrong with my DeepStream installation? Right now, my DS_SDK_PATH is pointing to the top directory (that includes binaries, LicenseAgreement, README, samples, sources).

Thank you so much!

Hi,
The app is for dGPU and does not work on Xavier.

Thank you for your response. Is there an anomaly detection example for the Tegra platform? I am trying to implement a motion detection pipeline and any advice or examples to get a better understanding of Deepstream for Xavier would be greatly appreciated.

Thank you so much!