0

Rosanswers logo

hi guys

i am trying to add opencv_contrib module to my existing opencv and i am getting following error, please help

-- Looking for sys/videoio.h - not found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Found apache ant 1.9.6: /usr/bin/ant
-- Caffe:   NO
-- Protobuf:   YES
-- Glog:   NO
CMake Error at /home/zubair/opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download):
  Unknown CMake command "ocv_download".
Call Stack (most recent call first):
  /home/zubair/opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred! See also "/home/zubair/opencv/CMakeFiles/CMakeOutput.log". See also "/home/zubair/opencv/CMakeFiles/CMakeError.log".

these are last few lines of error ..


Originally posted by zubair on ROS Answers with karma: 178 on 2017-05-05

Post score: 0


Original comments

Comment by Irod on 2017-05-05:
Hi! ...Could you show what it says on the file: "CMakeOutput.log"? It seems like you have some missing dependencies. Try installing libavresample first : "apt-get install libavresample-dev" and try it again.

1 Answers1

0

Rosanswers logo

Hi!

I don’t have a clear answer, but I’ll share my experience so far with Opencv module.

I recommend you to work with the at least sources in order to keep opencv and opencv contrib synced, and because releases of opencv contrib are not that frequent. If you are planning to keep it automatically updated, you might want to use scripts. In a bash script (update.sh):

#!/bin/bash 
cd opencv && git pull 
cd ../opencv_contrib && git pull

then with powershell:

$src = "I:/opencv-master/opencv"
$srcextra =
"I:/opencv-master/opencv/opencv_contrib"
$build = "I:/opencv-master/build"
$target = "Visual Studio 15 2017
Win64" bash update.sh cd $build

rm -Recurse -Force CMake* cmake -G $target -T v140,host=x64 -DOPENCV_ENABLE_NONFREE=1 -DOPENCV_EXTRA_MODULES_PATH="../opencv_contrib/modules" ` ../opencv | Tee-Object -Variable RESULT if("$RESULT" -eq 1) { "cmake didn't succeed, exiting." exit } msbuild.exe OpenCV.sln /verbosity:m /m cd ..


Originally posted by SarikaA with karma: 16 on 2018-07-15

This answer was ACCEPTED on the original site

Post score: 0