gst-inference icon indicating copy to clipboard operation
gst-inference copied to clipboard

OpenCV 4.1 is not detected

Open GFallasRR opened this issue 5 years ago • 0 comments

Hi GstInference team,

In the configure process, GstInference searches for OpenCV 2.X or 3.X, in case of systems with OpenCV 4.1 installed, this package is not detected and inference overlay plugins are discarded.

Example: Jetson Xavier running JetPack 4.3

libopencv-dev is already the newest version (4.1.1-2-gd5a58aa75).

After configure:

configure: *** checking feature: OpenCV computer vision library *** configure: *** for plug-ins: opencv *** checking for OPENCV... no configure: No package 'opencv' found configure: *** These plugins will not be built: opencv

For this cases, We must add a section to clarify OpenCV required version: I had to build OpenCV 3.4 from sources to enable inference overlay plugins

wget https://github.com/opencv/opencv/archive/3.4.zip
unzip 3.4.zip
rm 3.4.zip
cd opencv-3.4
mkdir build
cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D INSTALL_C_EXAMPLES=ON \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D WITH_TBB=ON \
      -D WITH_V4L=ON \
      -D WITH_QT=ON \
      -D WITH_OPENGL=ON \
      -D WITH_GSTREAMER=ON \
      -D BUILD_EXAMPLES=ON ..

make -j$(nproc)
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

GFallasRR avatar Feb 14 '20 23:02 GFallasRR