ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

error in adding extra module in opencv

asked 2017-05-05 03:42:11 -0500

zubair gravatar image

updated 2018-07-15 02:37:45 -0500

jayess gravatar image

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 ..

edit retag flag offensive close merge delete

Comments

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.

Irod gravatar image Irod  ( 2017-05-05 09:13:17 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-07-15 23:59:49 -0500

SarikaA gravatar image

updated 2018-07-28 21:07:09 -0500

jayess gravatar image

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 ..
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-05 03:42:11 -0500

Seen: 774 times

Last updated: Jul 28 '18