With gst-dsexample when I'm using with_opencv?=1 It's showing me error

Please provide complete information as applicable to your setup.

**• Hardware Platform -----> GPU
• DeepStream Version------> 7.0
• TensorRT Version -----> 8.5
**• NVIDIA GPU Driver Version -----> 545

docker image name :- 7.0-samples-multiarch

I want to build “dsexample” with opencv enable ! When running “make” I am getting error like this !!!

Package opencv4 was not found in the pkg-config search path.
Perhaps you should add the directory containing opencv4.pc' to the PKG_CONFIG_PATH environment variable No package 'opencv4' found Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containing opencv4.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘opencv4’ found
Package opencv4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv4.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘opencv4’ found
-fPIC -DDS_VERSION=“7.0.0” -I /usr/local/cuda-12.2/include -I …/…/includes -DWITH_OPENCV -I /usr/include/opencv4
g++ -c -o gstdsexample.o -fPIC -DDS_VERSION="7.0.0" -I /usr/local/cuda-12.2/include -I …/…/includes -DWITH_OPENCV -I /usr/include/opencv4 gstdsexample.cpp
In file included from gstdsexample.cpp:19:
gstdsexample.h:16:10: fatal error: gst/base/gstbasetransform.h: No such file or directory
16 | include <gst/base/gstbasetransform.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:69: gstdsexample.o] Error 1

@snehashish.debnath

please refer to “Pre-requisites” in opt\nvidia\deepstream\deepstream\sources\gst-plugins\gst-dsexample\README. please make sure opencv is installed.

we have followed this step in OpenCV: Installation in Linux
by default, OpenCV will be installed in the /usr/local directory

but according to Makefile it’s searching in `/usr/

ifeq ($(WITH_OPENCV),1)
CFLAGS+= -DWITH_OPENCV \
	 -I /usr/include/opencv4
PKGS+= opencv4

so are we doing something wrong?

please refer to my test log log-0917.txt (81.3 KB). after executing “apt-get install && apt-get install libopencv-dev”, “No package ‘opencv4’ found” issue was fixed.