Running trt-yolo-app on Jetson tx2 gives errors

While running make /deepstream-plugins-DS2/sources/apps/trt-yolo I get this error
Building lib
make -C …/…/lib
make[1]: Entering directory ‘/home/nvidia/Downloads/deepstream-plugins-DS2/sources/lib’
if [ ! -d “models” ]; then mkdir -p models; fi
if [ ! -d “calibration” ]; then mkdir -p calibration; fi
if [ ! -d “build” ]; then mkdir -p build; fi
if [ ! -d “…/…/…/data/detections” ]; then mkdir -p ./…/…/data/detections; fi
ar rcs libyoloplugin.a ./build/network_config.o ./build/yolov3-tiny.o ./build/calibrator.o ./build/yolov2.o ./build/yoloplugin_lib.o ./build/plugin_factory.o ./build/yolov3.o ./build/trt_utils.o ./build/yolov2-tiny.o ./build/yolo.o ./build/ds_image.o ./build/kernels.o
make[1]: Leaving directory ‘/home/nvidia/Downloads/deepstream-plugins-DS2/sources/lib’
Building trt-yolo-app
g++ -o trt-yolo-app trt-yolo-app.cpp …/…/lib/build/plugin_factory.o …/…/lib/build/yolov3.o …/…/lib/build/yolov2-tiny.o …/…/lib/build/ds_image.o …/…/lib/build/network_config.o …/…/lib/build/yolov3-tiny.o …/…/lib/build/trt_utils.o …/…/lib/build/calibrator.o …/…/lib/build/yolo.o …/…/lib/build/yolov2.o …/…/lib/build/kernels.o …/…/lib/build/yoloplugin_lib.o -O2 -std=c++11 -lstdc++fs -Wall -Wunused-function -Wunused-variable -Wfatal-errors -I …/…/lib -I “/home/nvidia/Downloads/TensorRT-4.0.1.6/include” -I “/usr/local/cuda-9.0/include” -I “/path/to/opencv-3.4.0/include” -L “/usr/lib/aarch64-linux-gnu” -lnvinfer -lnvinfer_plugin -Wl,-rpath="/usr/lib/aarch64-linux-gnu" -L “/usr/local/cuda-9.0/lib64” -lcudart -lcublas -lcurand -Wl,-rpath="/usr/local/cuda-9.0/lib64" -L “/usr/lib” -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_highgui -lopencv_dnn -Wl,-rpath="/usr/lib" -L “usr/lib/aarch64-linux-gnu/” -lgflags
…/…/lib/build/trt_utils.o: In function blobFromDsImages(std::vector<DsImage, std::allocator<DsImage> > const&, int const&, int const&)': trt_utils.cpp:(.text+0x209c): undefined reference to cv::dnn::experimental_dnn_v4::blobFromImages(cv::InputArray const&, double, cv::Size, cv::Scalar_ const&, bool, bool)’
…/…/lib/build/yoloplugin_lib.o: In function YoloPluginProcess': yoloplugin_lib.cpp:(.text+0xe38): undefined reference to cv::dnn::experimental_dnn_v4::blobFromImages(cv::InputArray const&, double, cv::Size, cv::Scalar_ const&, bool, bool)’
collect2: error: ld returned 1 exit status
Makefile:71: recipe for target ‘trt-yolo-app’ failed
make: *** [trt-yolo-app] Error 1

Os: Ubuntu 16.04
Opencv : 3.4.1-dev
Jetpack: 3.3
Deepstream : 1.5

Hi,

Sorry for the late reply.
Have you rebuilt the OpenCV library on your own?

We can successfully compile and execute the trt-yolo-app with our default OpenCV package.
If you want to use custom OpenCV libraries, please make sure you have built it with dnn module and update the path in this configure file:
https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/blob/master/sources/apps/trt-yolo/Makefile#L59

Thanks.