Ask Your Question

Revision history [back]

ERROR WHILE INSTALLING OPENCV-3.4.9 IN UNBUNTU 20.--OPENCV_VIDEOSTAB

(cv) jv@jv-VirtualBox:~/opencv/build$ make -j4 [ 0%] Built target gen-pkgconfig [ 1%] Built target ippiw [ 8%] Built target libwebp [ 12%] Built target IlmImf [ 13%] Built target quirc [ 14%] Built target ittnotify [ 14%] Built target gen_opencv_python_source [ 17%] Built target libprotobuf [ 22%] Built target opencv_core [ 22%] Built target opencv_flann [ 22%] Built target opencv_version [ 23%] Built target opencv_ml [ 23%] Built target opencv_surface_matching [ 27%] Built target opencv_imgproc [ 27%] Built target opencv_reg [ 27%] Built target opencv_video [ 28%] Built target opencv_photo [ 29%] Built target opencv_imgcodecs [ 30%] Built target opencv_shape [ 31%] Built target opencv_features2d [ 34%] Built target opencv_dnn [ 35%] Built target opencv_videoio [ 36%] Built target opencv_calib3d [ 36%] Processing OpenCL kernels (superres) [ 36%] Processing OpenCL kernels (objdetect) Scanning dependencies of target opencv_ccalib [ 37%] Built target opencv_highgui Scanning dependencies of target opencv_superres Scanning dependencies of target opencv_videostab [ 37%] Building CXX object modules/ccalib/CMakeFiles/opencv_ccalib.dir/src/ccalib.cpp.o Scanning dependencies of target opencv_objdetect [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1.cpp.o [ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/deblurring.cpp.o [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/cascadedetect.cpp.o In file included from /home/jv/opencv/modules/core/include/opencv2/core.hpp:56, from /home/jv/opencv_contrib/modules/ccalib/src/precomp.hpp:45, from /home/jv/opencv_contrib/modules/ccalib/src/ccalib.cpp:46: /home/jv/opencv/modules/core/include/opencv2/core/traits.hpp: In instantiation of ‘struct cv::traits::Type<cv::keypoint>’: /home/jv/opencv/modules/core/include/opencv2/core/mat.inl.hpp:634:23: required from ‘cv::Mat::Mat(const std::vector<_Tp>&, bool) [with _Tp = cv::KeyPoint]’ /home/jv/opencv_contrib/modules/ccalib/src/ccalib.cpp:410:25: required from here /home/jv/opencv/modules/core/include/opencv2/core/traits.hpp:366:8: error: ‘type’ is not a member of ‘cv::DataType<cv::keypoint>’ 366 | { enum { value = DataType<t>::type }; }; | ^ make[2]: * [modules/ccalib/CMakeFiles/opencv_ccalib.dir/build.make:63: modules/ccalib/CMakeFiles/opencv_ccalib.dir/src/ccalib.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:5485: modules/ccalib/CMakeFiles/opencv_ccalib.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/cascadedetect_convert.cpp.o [ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/fast_marching.cpp.o [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_tracker.cpp.o [ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/frame_source.cpp.o [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1_cuda.cpp.o [ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/global_motion.cpp.o [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/haar.cpp.o [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/hog.cpp.o [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/input_array_utility.cpp.o [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/optical_flow.cpp.o [ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/main.cpp.o [ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/inpainting.cpp.o [ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o [ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/qrcode.cpp.o [ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/opencl_kernels_objdetect.cpp.o [ 38%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/opencl_kernels_superres.cpp.o [ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/haar.avx.cpp.o [ 38%] Linking CXX shared library ../../lib/libopencv_superres.so [ 38%] Built target opencv_superres [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/log.cpp.o [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/motion_stabilizing.cpp.o [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/optical_flow.cpp.o [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/outlier_rejection.cpp.o [ 38%] Linking CXX shared library ../../lib/libopencv_objdetect.so [ 38%] Built target opencv_objdetect [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/stabilizer.cpp.o [ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/wobble_suppression.cpp.o [ 39%] Linking CXX shared library ../../lib/libopencv_videostab.so [ 39%] Built target opencv_videostab make: * [Makefile:163: all] Error 2

and cmake commands: $ cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D INSTALL_C_EXAMPLES=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ -D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \ -D BUILD_EXAMPLES=ON ..

I stuck at this error for the whole day. Your help would be appreciated. I have installed the OpenCV in the home directory[~/opencv]. I followed this website method ,except for cloning the opencv-3.4.9. https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/

click to hide/show revision 2
None

updated 2020-06-16 09:15:18 -0600

berak gravatar image

ERROR WHILE INSTALLING OPENCV-3.4.9 IN UNBUNTU 20.--OPENCV_VIDEOSTAB

make output:

(cv) jv@jv-VirtualBox:~/opencv/build$ make -j4
[  0%] Built target gen-pkgconfig
[  1%] Built target ippiw
[  8%] Built target libwebp
[ 12%] Built target IlmImf
[ 13%] Built target quirc
[ 14%] Built target ittnotify
[ 14%] Built target gen_opencv_python_source
[ 17%] Built target libprotobuf
[ 22%] Built target opencv_core
[ 22%] Built target opencv_flann
[ 22%] Built target opencv_version
[ 23%] Built target opencv_ml
[ 23%] Built target opencv_surface_matching
[ 27%] Built target opencv_imgproc
[ 27%] Built target opencv_reg
[ 27%] Built target opencv_video
[ 28%] Built target opencv_photo
[ 29%] Built target opencv_imgcodecs
[ 30%] Built target opencv_shape
[ 31%] Built target opencv_features2d
[ 34%] Built target opencv_dnn
[ 35%] Built target opencv_videoio
[ 36%] Built target opencv_calib3d
[ 36%] Processing OpenCL kernels (superres)
[ 36%] Processing OpenCL kernels (objdetect)
Scanning dependencies of target opencv_ccalib
[ 37%] Built target opencv_highgui
Scanning dependencies of target opencv_superres
Scanning dependencies of target opencv_videostab
[ 37%] Building CXX object modules/ccalib/CMakeFiles/opencv_ccalib.dir/src/ccalib.cpp.o
Scanning dependencies of target opencv_objdetect
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1.cpp.o
[ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/deblurring.cpp.o
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/cascadedetect.cpp.o
In file included from /home/jv/opencv/modules/core/include/opencv2/core.hpp:56,
                 from /home/jv/opencv_contrib/modules/ccalib/src/precomp.hpp:45,
                 from /home/jv/opencv_contrib/modules/ccalib/src/ccalib.cpp:46:
/home/jv/opencv/modules/core/include/opencv2/core/traits.hpp: In instantiation of ‘struct cv::traits::Type<cv::keypoint>’:
cv::traits::Type<cv::KeyPoint>’:
/home/jv/opencv/modules/core/include/opencv2/core/mat.inl.hpp:634:23:   required from ‘cv::Mat::Mat(const std::vector<_Tp>&, bool) [with _Tp = cv::KeyPoint]’
/home/jv/opencv_contrib/modules/ccalib/src/ccalib.cpp:410:25:   required from here
/home/jv/opencv/modules/core/include/opencv2/core/traits.hpp:366:8: error: ‘type’ is not a member of ‘cv::DataType<cv::keypoint>’
‘cv::DataType<cv::KeyPoint>’
  366 | { enum { value = DataType<t>::type DataType<T>::type }; };
      |        ^
make[2]: * *** [modules/ccalib/CMakeFiles/opencv_ccalib.dir/build.make:63: modules/ccalib/CMakeFiles/opencv_ccalib.dir/src/ccalib.cpp.o] Error 1
make[1]:  *** [CMakeFiles/Makefile2:5485: modules/ccalib/CMakeFiles/opencv_ccalib.dir/all] Error 2
make[1]:  *** Waiting for unfinished jobs....
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/cascadedetect_convert.cpp.o
[ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/fast_marching.cpp.o
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_tracker.cpp.o
[ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/frame_source.cpp.o
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/btv_l1_cuda.cpp.o
[ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/global_motion.cpp.o
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/haar.cpp.o
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/hog.cpp.o
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/input_array_utility.cpp.o
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/optical_flow.cpp.o
[ 37%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/main.cpp.o
[ 37%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/inpainting.cpp.o
[ 37%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o
[ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/qrcode.cpp.o
[ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/opencl_kernels_objdetect.cpp.o
[ 38%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/opencl_kernels_superres.cpp.o
[ 38%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/haar.avx.cpp.o
[ 38%] Linking CXX shared library ../../lib/libopencv_superres.so
[ 38%] Built target opencv_superres
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/log.cpp.o
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/motion_stabilizing.cpp.o
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/optical_flow.cpp.o
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/outlier_rejection.cpp.o
[ 38%] Linking CXX shared library ../../lib/libopencv_objdetect.so
[ 38%] Built target opencv_objdetect
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/stabilizer.cpp.o
[ 38%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/wobble_suppression.cpp.o
[ 39%] Linking CXX shared library ../../lib/libopencv_videostab.so
[ 39%] Built target opencv_videostab
make: * *** [Makefile:163: all] Error 2

2

and cmake commands: commands:

$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D INSTALL_C_EXAMPLES=OFF \
    -D OPENCV_ENABLE_NONFREE=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    -D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \
    -D BUILD_EXAMPLES=ON ..

..

I stuck at this error for the whole day. Your help would be appreciated. I have installed the OpenCV in the home directory[~/opencv]. I followed this website method ,except for cloning the opencv-3.4.9. https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/