반응형




OpenCV 4.2.0과 opencv_contrib(extra modules)를 컴파일하여 Ubuntu 18.04에 설치하는 방법을 다룹니다.





1. 설치된 OpenCV 제거


2. 기존 설치된 패키지 업그레이드


3. OpenCV 컴파일 전 필요한 패키지 설치


4. OpenCV 설정과 컴파일 및 설치


5. OpenCV 설치 결과 확인

    5.1. C/C++

    5.2. Python




최초작성 2018. 6.14

최종작성 2020. 06. 01


Python에서 사용할 OpenCV만 설치하는 경우에는 다음 명령으로 설치할 수 있습니다. 

OpenCV의 nonfree 모듈을 사용해야 할 경우에는 컴파일을 해야 합니다.  


pip3 install opencv-contrib-python


1. 설치된 OpenCV 제거 

전에 설치했던 OpenCV가 있다면 새로 설치하는 OpenCV 4.2.0 버전이 제대로 동작하지 않기 때문에 제거해주어야 합니다.


아래처럼 보이면 OpenCV가 설치안되어 있는 상태입니다. 다음 단계로 넘어가도  됩니다.


webnautes@webnautes-pc:~$ pkg-config --modversion opencv
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found




OpenCV 2.4대 버전이 설치되어 있는 경우에는 OpenCV  2.4 버전이 출력됩니다.


webnautes@webnautes-pc:~$ pkg-config --modversion opencv
2.4.9.1



다음 명령으로 OpenCV 라이브러리 설정 파일을 포함해서 기존에 설치된 OpenCV 패키지를 삭제하고 진행해야 합니다. 


$ sudo apt-get purge  libopencv* python-opencv
$ sudo apt-get autoremove




OpenCV 3 버전이 설치되어 있다면 다음처럼 보입니다.


webnautes@webnautes-pc:~$ pkg-config --modversion opencv
3.4.2



다음 명령으로 기존에 설치된 opencv 라이브러리를 삭제합니다. 파일을 확인해서 문제 없는 파일만 y를 눌러주면 삭제가 됩니다. 

아래 명령에서 rm 다음에 있는 -i를 제거하면 물어보지 않고 전부 삭제합니다. 


webnautes@webnautes-pc:~$  sudo find /usr/local/ -name "*opencv*" -exec rm -i {} \;




2. 기존 설치된 패키지 업그레이드

OpenCV 4.2.0를 설치해주기 전에 기존에 설치된 패키지들을 업그레이드 해주기 위한 작업입니다. 

오래 걸리더라도 해주는 것이 좋습니다. 



Ubuntu 저장소(repository)로부터 패키지 리스트를 업데이트합니다.

기존에 설치된 패키지들의 새로운 버전이 저장소에 있다면 리스트를 업데이트 하기위해 실행합니다. 


$ sudo apt-get update



기존에 설치된 패키지의 새로운 버전이 있으면 업그레이드를 진행합니다.


$ sudo apt-get upgrade




3. OpenCV 컴파일 전 필요한 패키지 설치


OpenCV를 컴파일하는데 사용하는 것들이 포함된 패키지들을 설치합니다. 언급한 패키지가 이미 설치된 경우도 있을 겁니다.



build-essential 패키지에는 C/C++ 컴파일러와 관련 라이브러리, make 같은 도구들이 포함되어 있습니다.

cmake는 컴파일 옵션이나 빌드된 라이브러리에 포함시킬 OpenCV 모듈 설정등을 위해 필요합니다. 


$ sudo apt-get install build-essential cmake




pkg-config는 프로그램 컴파일 및 링크시 필요한 라이브러리에 대한 정보를 메타파일(확장자가 .pc 인 파일)로부터 가져오는데 사용됩니다. 

터미널에서 특정 라이브러리를 사용한 소스코드를 컴파일시 필요한 컴파일러 및 링커 플래그를 추가하는데 도움이 됩니다.  


$ sudo apt-get install pkg-config




특정 포맷의 이미지 파일을 불러오거나 기록하기 위해 필요한 패키지들입니다.


$ sudo apt-get install libjpeg-dev libtiff5-dev libpng-dev




특정 코덱의 비디오 파일을 읽어오거나 기록하기 위해 필요한 패키지들입니다.


$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libxvidcore-dev libx264-dev libxine2-dev




Video4Linux 패키지는 리눅스에서 실시간 비디오 캡처를 지원하기 위한 디바이스 드라이버와 API를 포함하고 있습니다. 


$ sudo apt-get install libv4l-dev v4l-utils




GStreamer는 비디오 스트리밍을 위한 라이브러리입니다. 

 

$ sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 




OpenCV에서는 highgui 모듈을 사용하여 자체적으로 윈도우 생성하여 이미지나 비디오를 보여줄 수 있습니다. 

윈도우 생성 등의 GUI를 위해 gtk 또는 qt를 선택해서 사용가능합니다.  여기서는 gtk2를 지정해주었습니다.


$ sudo apt-get install libgtk2.0-dev



그외 선택 가능한 패키지는 다음과 같습니다.
libgtk-3-dev

libqt4-dev

libqt5-dev




OpenGL 지원하기 위해 필요한 라이브러리입니다.

 

$ sudo apt-get install mesa-utils libgl1-mesa-dri libgtkgl2.0-dev libgtkglext1-dev  




OpenCV 최적화를 위해 사용되는 라이브러리들입니다.

 

$ sudo apt-get install libatlas-base-dev gfortran libeigen3-dev




python2.7-dev와 python3-dev 패키지는 OpenCV-Python 바인딩을 위해 필요한 패키지들입니다. 

Numpy는 매트릭스 연산등을 빠르게 처리할 수 있어서 OpenCV에서 사용됩니다. 


$ sudo apt-get install python2.7-dev python3-dev python-numpy python3-numpy




4. OpenCV 설정과 컴파일 및 설치


소스 코드를 저장할 임시 디렉토리를 생성하여 이동 후.. 진행합니다.


webnautes@webnautes-pc:~$ mkdir opencv
webnautes@webnautes-pc:~$ cd opencv
webnautes@webnautes-pc:~/opencv




OpenCV 4.2.0 소스코드를 다운로드 받아 압축을 풀어줍니다.

 

$ wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip
$ unzip opencv.zip




opencv_contrib(extra modules) 소스코드를 다운로드 받아 압축을 풀어줍니다.

SIFT, SURF 등을 사용하기 위해 필요합니다.


$ wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip
$ unzip opencv_contrib.zip




다음처럼 두 개의 디렉토리가 생성됩니다. 


webnautes@webnautes-pc:~/opencv$ ls -d */
opencv-4.2.0/  opencv_contrib-4.2.0/




opencv-4.2.0 디렉토리로 이동하여 build 디렉토리를 생성하고 build 디렉토리로 이동합니다.

컴파일은 build 디렉토리에서 이루어집니다.


webnautes@webnautes-pc:~/opencv$ cd opencv-4.0.1/
webnautes@webnautes-pc:~/opencv/opencv-4.2.0$ mkdir build
webnautes@webnautes-pc:~/opencv/opencv-4.2.0$ cd build
webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build




cmake를 사용하여 OpenCV 컴파일 설정을 해줍니다. 


OpenCV 4에서 pkg-config를 디폴트로 지원하지 않는 것으로 바뀌었습니다. 

그래서 OPENCV_GENERATE_PKGCONFIG=ON 옵션을 추가해야합니다.

( 참고 https://github.com/opencv/opencv/issues/13154


Non free 모듈을 사용하려면 다음 옵션을 추가하세요.

-D OPENCV_ENABLE_NONFREE=ON  



cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=OFF \
-D WITH_IPP=OFF \
-D WITH_1394=OFF \
-D BUILD_WITH_DEBUG_INFO=OFF \
-D BUILD_DOCS=OFF \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D WITH_QT=OFF \
-D WITH_GTK=ON \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.2.0/modules \
-D WITH_V4L=ON  \
-D WITH_FFMPEG=ON \
-D WITH_XINE=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON ../




에러가 나는 경우 한줄로 바꾼 다음 명령을 사용하세요. 


cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=OFF -D WITH_IPP=OFF -D WITH_1394=OFF -D BUILD_WITH_DEBUG_INFO=OFF -D BUILD_DOCS=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D WITH_QT=OFF -D WITH_GTK=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.2.0/modules -D WITH_V4L=ON  -D WITH_FFMPEG=ON -D WITH_XINE=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D OPENCV_GENERATE_PKGCONFIG=ON ../




다음과 같은 메시지가 보이면 정상적으로 된 것입니다.


-- Configuring done

-- Generating done

-- Build files have been written to: /home/webnautes/opencv/opencv-4.2.0/build




cmake를 사용하여 진행한 OpenCV 컴파일 관련 설정 결과입니다.


-- General configuration for OpenCV 4.2.0 =====================================
--   Version control:               unknown
--
--   Extra modules:
--     Location (extra):            /home/webnautes/opencv/opencv_contrib-4.2.0/modules
--     Version control (extra):     unknown
--
--   Platform:
--     Timestamp:                   2020-03-29T09:50:36Z
--     Host:                        Linux 5.0.0-37-generic x86_64
--     CMake:                       3.10.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (14 files):         + SSSE3 SSE4_1
--       SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (4 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (27 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (3 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 7.5.0)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--gc-sections 
--     Linker flags (Debug):        -Wl,--gc-sections 
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          dl m pthread rt /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv hdf java js matlab ovis sfm ts viz
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
--
--   GUI:
--     GTK+:                        YES (ver 2.24.32)
--       GThread :                  YES (ver 2.56.4)
--       GtkGlExt:                  YES (ver 1.2.0)
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)
--     VTK support:                 NO
--
--   Media I/O:
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        libjpeg-turbo (ver 2.0.2-62)
--     WEBP:                        build (ver encoder: 0x020e)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        build (ver 42 - 4.0.10)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     FFMPEG:                      YES
--       avcodec:                   YES (57.107.100)
--       avformat:                  YES (57.83.100)
--       avutil:                    YES (55.78.100)
--       swscale:                   YES (4.8.100)
--       avresample:                NO
--     GStreamer:                   YES (1.14.5)
--     v4l/v4l2:                    YES (linux/videodev2.h)
--     Xine:                        YES (ver 1.2.8)
--
--   Parallel framework:            pthreads
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.3.4)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.5.1)
--
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/webnautes/opencv/opencv-4.2.0/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.17)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.17)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)
--     install path:                lib/python2.7/dist-packages/cv2/python-2.7
--
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.6.9)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.6m.so (ver 3.6.9)
--     numpy:                       /home/webnautes/.local/lib/python3.6/site-packages/numpy/core/include (ver 1.17.4)
--     install path:                lib/python3.6/dist-packages/cv2/python-3.6
--
--   Python (for build):            /usr/bin/python2.7
--
--   Java:                         
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/webnautes/opencv/opencv-4.2.0/build




다음처럼 Python 2 또는 Python 3 라이브러리 항목이 보이지 않는 경우에는   


--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.17)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.17)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)
--     install path:                lib/python2.7/dist-packages/cv2/python-2.7
--
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.6.9)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.6m.so (ver 3.6.9)
--     numpy:                       /home/webnautes/.local/lib/python3.6/site-packages/numpy/core/include (ver 1.17.4)
--     install path:                lib/python3.6/dist-packages/cv2/python-3.6




붉은색 줄처럼 해당 경로들을 직접 적어줘야 합니다.   포스팅에서 사용한 옵션과 차이가 있을 수 있습니다. 


cmake -D CMAKE_BUILD_TYPE=RELEASE \

-D CMAKE_INSTALL_PREFIX=/usr/local \

-D WITH_TBB=OFF \

-D WITH_IPP=OFF \

-D WITH_1394=OFF \

-D BUILD_WITH_DEBUG_INFO=OFF \

-D BUILD_DOCS=OFF \

-D INSTALL_C_EXAMPLES=ON \

-D INSTALL_PYTHON_EXAMPLES=ON \

-D BUILD_EXAMPLES=OFF \

-D BUILD_TESTS=OFF \

-D BUILD_PERF_TESTS=OFF \

-D WITH_QT=OFF \

-D WITH_GTK=ON \

-D WITH_OPENGL=ON \

-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.2.0/modules \

-D WITH_V4L=ON  \

-D WITH_FFMPEG=ON \

-D WITH_XINE=ON \

-D BUILD_NEW_PYTHON_SUPPORT=ON \

-D OPENCV_GENERATE_PKGCONFIG=ON \
-D PYTHON2_INCLUDE_DIR=/usr/include/python2.7 \

-D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include/ \

-D PYTHON2_PACKAGES_PATH=/usr/lib/python2.7/dist-packages \

-D PYTHON2_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so \

-D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \

-D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include/  \

-D PYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \

-D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \

../




컴파일을 시작하기 전에 사용 중인 컴퓨터의 CPU 코어수를 확인합니다.


$ cat /proc/cpuinfo | grep processor | wc -l
4




make 명령을 사용하여 컴파일을 시작합니다. -j 다음에 위에서 확인한 숫자를 붙여서 실행해줍니다.

앞에 time을 붙여서 실행하면 컴파일 완료 후 걸린 시간을 알려줍니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ time make -j4



컴파일 성공하면 다음과 같은 메시지를 볼 수 있습니다.


[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o
[100%] Linking CXX shared module ../../lib/python3/cv2.cpython-36m-x86_64-linux-gnu.so
[100%] Linking CXX shared module ../../lib/cv2.so
[100%] Built target opencv_python3
[100%] Built target opencv_python2

real 17m15.631s
user 55m47.050s
sys 2m39.468s



참고로 i5, SSD, 16G 메모리를 장착한 노트북에서 컴파일한데 걸린 시간은  위 결과에서 user + sys를 더한 약 57분입니다. 



이제 컴파일 결과물을 설치합니다.

 

webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ sudo make install



/etc/ld.so.conf.d/ 디렉토리에 /usr/local/lib를 포함하는 설정파일이 있는지 확인합니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ cat /etc/ld.so.conf.d/*
/usr/lib/x86_64-linux-gnu/libfakeroot

# libc default configuration

/usr/local/lib

# Multiarch support

/usr/local/lib/x86_64-linux-gnu

/lib/x86_64-linux-gnu

/usr/lib/x86_64-linux-gnu




/usr/local/lib이 출력되지 않았다면 다음 명령을 추가로 실행해야합니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$  sudo sh -c 'echo '/usr/local/lib' > /etc/ld.so.conf.d/opencv.conf'




/usr/local/lib을 찾은 경우나 못찾아서 추가한 작업을 한 경우 모두 컴파일시 opencv  라이브러리를 찾을 수 있도록 다음 명령을 실행합니다.


webnautes@webnautes-pc:~/opencv/opencv-4.0.1/build$ sudo ldconfig




5. OpenCV 설치 결과 확인 

5.1. C/C++

OpenCV 3과 달리 opencv대신에 opencv4를 옵션으로 사용하여 pkg-config를 실행해야 컴파일할 수 있습니다. 

$ g++ -o facedetect /usr/local/share/opencv4/samples/cpp/facedetect.cpp $(pkg-config opencv4 --libs --cflags)



실행시켜보면 얼굴 인식이 됩니다. 

$ ./facedetect --cascade="/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml" --scale=1.3



다음 포스팅도 참고하세요. 



Visual Studio Code에서 CMake 사용하여 OpenCV 코드 컴파일 하기

https://webnautes.tistory.com/933 





5.2. Python

1. python 2.x와 python 3x에서 opencv 라이브러리를 사용가능한지는 다음처럼 확인합니다.

각각 OpenCV 버전이 출력되어야 합니다.

webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ python
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 

[GCC 7.4.0] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import cv2

>>> cv2.__version__

'4.2.0'

>>> 



webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 

[GCC 8.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import cv2

>>> cv2.__version__

'4.2.0'

>>> 



혹시 다른 버전이 나온다면 다음 위치에 있는 cv2 디렉토리를 삭제하고 다시 해보세요.


sudo rm -rf ~ /.local/lib/python3.6/site-packages/cv2




2. 기존 OpenCV 3를 삭제 후 진행했다면 다음과 같은 에러가 날 수 있습니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ python
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 

[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libopencv_reg.so.3.4: cannot open shared object file: No such file or directory



다음 처럼  cv2.so를 복사해줘야 합니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ sudo cp /usr/local/python/cv2/python-2.7/cv2.so /usr/local/lib/python2.7/dist-packages/

webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ sudo cp /usr/local/python/cv2/python-2.7/cv2.so /usr/lib/python2.7/dist-packages/

webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ sudo cp /usr/local/python/cv2/python-3.6/cv2.cpython-36m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages

webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ sudo cp /usr/local/python/cv2/python-3.6/cv2.cpython-36m-x86_64-linux-gnu.so /usr/local/lib/python3.6/dist-packages



3. 예제 코드를 실행해봅니다.


$  python /usr/local/share/opencv4/samples/python/facedetect.py --cascade "/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade "/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml" /dev/video0



$  python3 /usr/local/share/opencv4/samples/python/facedetect.py --cascade "/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade "/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml" /dev/video0




다음처럼  터미널에 표시되면서 카메라 영상에 얼굴이 검출된 결과를 얻을 수 있습니다.


python2


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$  python /usr/local/share/opencv4/samples/python/facedetect.py --cascade "/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade "/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml" /dev/video0


face detection using haar cascades


USAGE:

    facedetect.py [--cascade <cascade_fn>] [--nested-cascade <cascade_fn>] [<video_source>]


[ INFO:0] Initialize OpenCL runtime...



python3


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$   python3 /usr/local/share/opencv4/samples/python/facedetect.py --cascade "/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade "/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml" /dev/video0


face detection using haar cascades


USAGE:

    facedetect.py [--cascade <cascade_fn>] [--nested-cascade <cascade_fn>] [<video_source>]


[ INFO:0] Initialize OpenCL runtime...




4. 이제 필요 없어진 컴파일에 사용했던 opencv 소스코드 디렉토리를 삭제합니다.


webnautes@webnautes-pc:~/opencv/opencv-4.2.0/build$ cd
webnautes@webnautes-pc:~$ rm -rf opencv




반응형

해보고 확인한 것을 문서화하여 기록합니다.


공부한 내용을 공유하는 공간입니다.
부족함이 있지만 도움이 되었으면 합니다.
잘못된 부분이나 개선점을 알려주시면 감사하겠습니다.



포스트 작성시에는 문제 없었지만 이후 문제가 생길 수 있습니다.
문제가 생기면 포스트와 바뀐 환경이 있나 먼저 확인해보세요.

질문을 남겨주면 가능한 빨리 답변드립니다.


제가 쓴 책도 한번 검토해보세요 ^^

  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기

댓글을 달아 주세요

">
  1. 이전 댓글 더보기
  2. thumbnail
    익명
    2020.08.20 15:23

    비밀댓글입니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.08.20 16:45 신고

      리눅스서버가 윈도우와 같은 데스크톱 환경을 지원한다면 vnc로 확인할수 있습니다. 좀 느린 단점이 있습니다. 데스크톱 환경이 아니라면 이미지를 저장해서 확인할 수 밖에 없습니다.

  3. thumbnail
    bnmy6581
    2020.09.05 23:41

    libqt5-dev는 없는 패키지라고 나옵니다

    포스팅 정말 감사합니다 ~ 만수무강하세요 ^^

  4. thumbnail
    리눅스초보
    2020.09.14 17:16

    안녕하세요
    포스팅 감사합니다.
    다름이아니라 python 으로 버전을 확인했을 때에는 4.2.0이 잘 나왓는데 python3에서는 4.4.0이 나와서요
    어떻게 해결해야할까요? 그냥 사용해도 문제가 없을까요'?

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.14 20:36 신고

      두가지 버전이 설치된듯합니다.

      pip3 명령으로 설치한적이 있다면 제거해주세요.

      다음 명령으로 opencv가 있나 보세요
      pip3 list

  5. thumbnail
    리눅스 초보
    2020.09.15 15:11

    지웟더니 제대로 버전이 나오네요
    감사합니다 !

  6. thumbnail
    ㅇㅇㅇㅇ
    2020.09.21 15:49

    Gtk-ERROR **: 07:24:19.665: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
    Trace/breakpoint trap
    이런오류가 뜨는데 어떻게 해야될까요ㅠㅠ

  7. thumbnail
    jhjun724
    2020.09.22 20:06

    안녕하세요
    opencv 설치중에 마지막 cat /etc/ld.so.conf.d/*에서 /usr/local/lib 가 뜨는 것까지 확인을 했습니다.
    하지만 sudo ldconfig를 실행하였을때 /sbin/ldconfig.real: /usr/lib/ is not a symoblic link라는 문구가 뜨는데 제대로 되는 것인지 모르겠습니다.
    또한 pkg-config --modversion opencv 로 버전 확인을 하였을때 3.2.0이라 뜨고
    python으로 import cv2, cv2.__version__ 을 입력하였을 때 '4.2.0'이라 뜨는데 문제가 없는 것인지 알고 싶습니다.

    기존에 3.2.0을 쓰다가 cv::HoughLinesPointSet 함수를 쓰기 위해서 버전을 업그레이드 하려는데
    설치 전 버전 확인이 안되는 것을 확인하고 설치를 진행하였는데 아직 문제가 있는것 같습니다.
    도와주시면 감사드리겠습니다.

    • thumbnail
      BlogIcon jhjun724
      2020.09.22 20:18

      현재 /usr/include/opencv2/ 의 라이브러리는 4.2.0으로 업데이트가 되지 않은 것 같고, /usr/local/include/opencv4/opencv2/를 사용하면 /usr/include/opencv2/ 와 충돌이 일어나는 것으로 보입니다.

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.22 21:12 신고

      다음 명령으로 검색하여 3.2가 붙은 파일들을 지우세요

      find /usr | grep libopencv


      그리고 나서 sudo ldconfig를 실행하면 해결될겁니다.

      OpenCV 4.2에선 /usr/include/opencv2/ 대신에 /usr/local/include/opencv4/opencv2/를 사용합니다.


      위에 언급한것들을 진행한후 다음 명령으로 OpenCV 4.2.0 옵션들이 보이는지 보세요
      pkg-config opencv4 --libs --cflags

    • thumbnail
      BlogIcon jhjun724
      2020.09.23 22:11

      /usr/include 의 opencv들을 제거하고 CMakelists.txt에서 따로 손봐주니 해결됐습니다. 감사합니다~

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.23 22:31 신고

      해결되서 다행입니다.

  8. thumbnail
    hee
    2020.09.24 15:19

    pkg-config --modversion opencv 이걸로 검색하면 3.2.0버전이 나오고 python 들어가서 cv2.__version__하면 제대로 설치된것이 나오는데 어떻게해야되나요ㅠㅠㅠㅠㅠ

    • thumbnail
      BlogIcon hee
      2020.09.24 15:21

      find /usr | grep libopencv ㅇㅣ걸로 찾아서 지우는걸 어떻게 해야되는지 모르겠네요ㅠㅠ

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.24 15:56 신고

      OpenCV 3.2를 지우는 거라면 다음처럼 검색된 것을 하나씩 지우세요

      sudo rm 검색된 OpenCV 3.2 라이브러리 파일 전체 경로(파일 이름 포함)

      다지운후 다음 명령을 하면 반영됩니다
      sudo ldconfig

      다음 명령으로 OpenCV 4.x 옵션이 보이나보세요

      pkg-config opencv4 --libs --cflags

    • thumbnail
      BlogIcon hee
      2020.09.24 16:00

      꼭하나씩 지워야하나용??? 그리구 pkg-config opencv4 --libs --cflags 하면

      -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_gapi -lopencv_stitching -lopencv_alphamat -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_highgui -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core

      이렇게 나옵니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.24 16:09 신고

      실수할까봐 그랬는데 한번에 지우셔도 됩니다. OpenCV 4는 제대로 인식되었네요

    • thumbnail
      BlogIcon hee
      2020.09.25 11:09

      한번에 다 지우는 명령어는 어떻게 적나요? 3.2 버전을 다 지울예정입니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.25 11:30 신고

      파일.목록을 올려줘보세요. 탐색기로 해당 경로가서 선택해서 지워도 될듯합니다

    • thumbnail
      BlogIcon hee
      2020.09.25 12:59


      /usr/local/lib/libopencv_xobjdetect.so.4.4
      /usr/local/lib/libopencv_structured_light.so.4.4
      /usr/local/lib/libopencv_dnn.so.4.4.0
      /usr/local/lib/libopencv_videoio.so
      /usr/local/lib/libopencv_freetype.so
      /usr/local/lib/libopencv_xfeatures2d.so
      /usr/local/lib/libopencv_stereo.so.4.4
      /usr/local/lib/libopencv_photo.so.4.4
      /usr/local/lib/libopencv_hfs.so.4.4.0
      /usr/local/lib/libopencv_intensity_transform.so.4.4
      /usr/local/lib/libopencv_intensity_transform.so.4.4.0
      /usr/local/lib/libopencv_aruco.so.4.4
      /usr/local/lib/libopencv_img_hash.so.4.4
      /usr/local/lib/libopencv_tracking.so
      /usr/local/lib/libopencv_img_hash.so.4.4.0
      /usr/local/lib/libopencv_surface_matching.so.4.4.0
      /usr/local/lib/libopencv_highgui.so.4.4.0
      /usr/local/lib/libopencv_xphoto.so.4.4.0
      /usr/local/lib/libopencv_alphamat.so
      /usr/local/lib/libopencv_video.so.4.4
      /usr/local/lib/libopencv_bioinspired.so.4.4
      /usr/local/lib/libopencv_plot.so
      /usr/local/lib/libopencv_objdetect.so
      /usr/local/lib/libopencv_core.so.4.4.0
      /usr/local/lib/libopencv_stitching.so.4.4.0
      /usr/local/lib/libopencv_bioinspired.so.4.4.0
      /usr/local/lib/libopencv_imgproc.so
      /usr/local/lib/libopencv_img_hash.so
      /usr/local/lib/libopencv_saliency.so
      /usr/local/lib/libopencv_xphoto.so
      /usr/local/lib/libopencv_datasets.so.4.4
      /usr/local/lib/libopencv_superres.so.4.4
      /usr/local/lib/libopencv_features2d.so.4.4.0
      /usr/local/lib/libopencv_bgsegm.so
      /usr/local/lib/libopencv_shape.so.4.4.0
      /usr/local/lib/libopencv_objdetect.so.4.4.0
      /usr/local/lib/libopencv_hfs.so.4.4
      /usr/local/lib/libopencv_datasets.so.4.4.0
      /usr/local/lib/libopencv_surface_matching.so.4.4
      /usr/local/lib/libopencv_stitching.so.4.4
      /usr/local/lib/libopencv_rapid.so.4.4
      /usr/local/lib/libopencv_alphamat.so.4.4
      /usr/local/lib/libopencv_shape.so
      /usr/local/lib/libopencv_dpm.so.4.4.0
      /usr/local/lib/libopencv_dpm.so
      /usr/local/lib/libopencv_plot.so.4.4.0
      /usr/local/lib/libopencv_bgsegm.so.4.4
      /usr/local/lib/libopencv_phase_unwrapping.so.4.4.0
      /usr/local/lib/libopencv_ximgproc.so
      /usr/local/lib/libopencv_text.so.4.4
      /usr/local/lib/libopencv_dnn_superres.so.4.4.0
      /usr/local/lib/libopencv_calib3d.so
      /usr/local/lib/libopencv_text.so.4.4.0
      /usr/local/lib/libopencv_dnn_objdetect.so
      /usr/local/lib/libopencv_ccalib.so
      /usr/local/lib/libopencv_video.so.4.4.0
      /usr/local/lib/libopencv_videoio.so.4.4.0
      /usr/local/lib/libopencv_rgbd.so
      /usr/local/lib/libopencv_shape.so.4.4
      /usr/local/lib/libopencv_text.so
      /usr/local/lib/libopencv_dnn_objdetect.so.4.4
      /usr/local/lib/libopencv_phase_unwrapping.so
      /usr/local/lib/libopencv_quality.so.4.4.0
      /usr/local/lib/libopencv_fuzzy.so
      /usr/local/lib/libopencv_reg.so.4.4.0
      /usr/local/lib/libopencv_hfs.so
      /usr/local/lib/libopencv_reg.so.4.4
      /usr/local/lib/libopencv_calib3d.so.4.4.0
      /usr/local/lib/libopencv_highgui.so
      /usr/local/lib/libopencv_dnn.so
      /usr/local/lib/libopencv_imgcodecs.so.4.4
      /usr/local/lib/libopencv_gapi.so.4.4
      /usr/local/lib/libopencv_dnn_objdetect.so.4.4.0
      /usr/local/lib/libopencv_videoio.so.4.4
      /usr/local/lib/libopencv_face.so.4.4.0
      /usr/local/lib/libopencv_xphoto.so.4.4
      /usr/local/lib/libopencv_flann.so.4.4
      /usr/local/lib/libopencv_saliency.so.4.4.0
      /usr/local/lib/libopencv_ccalib.so.4.4.0
      /usr/local/lib/libopencv_rgbd.so.4.4.0
      /usr/local/lib/libopencv_structured_light.so
      /usr/local/lib/libopencv_dnn_superres.so
      /usr/local/lib/libopencv_flann.so.4.4.0
      /usr/local/lib/libopencv_imgproc.so.4.4.0
      /usr/local/lib/libopencv_xfeatures2d.so.4.4.0
      /usr/local/lib/libopencv_bgsegm.so.4.4.0
      /usr/local/lib/libopencv_ml.so
      /usr/local/lib/libopencv_flann.so
      /usr/local/lib/libopencv_bioinspired.so
      /usr/local/lib/libopencv_face.so.4.4
      /usr/local/lib/libopencv_fuzzy.so.4.4
      /usr/local/lib/libopencv_superres.so.4.4.0
      /usr/local/lib/libopencv_ml.so.4.4.0
      /usr/local/lib/libopencv_features2d.so
      /usr/local/lib/libopencv_rapid.so.4.4.0
      /usr/local/lib/libopencv_highgui.so.4.4
      /usr/local/lib/libopencv_gapi.so
      /usr/local/lib/libopencv_line_descriptor.so.4.4.0
      /usr/local/lib/libopencv_quality.so.4.4
      /usr/local/lib/libopencv_stereo.so
      /usr/local/lib/libopencv_xfeatures2d.so.4.4
      /usr/local/lib/libopencv_optflow.so.4.4.0
      /usr/local/lib/libopencv_tracking.so.4.4.0
      /usr/local/lib/libopencv_rapid.so
      /usr/local/lib/libopencv_videostab.so
      /usr/local/lib/libopencv_freetype.so.4.4
      /usr/local/lib/libopencv_calib3d.so.4.4
      /usr/local/lib/libopencv_intensity_transform.so
      /usr/local/lib/libopencv_imgcodecs.so
      /usr/local/lib/libopencv_stereo.so.4.4.0
      /usr/local/lib/libopencv_dpm.so.4.4
      /usr/local/lib/libopencv_freetype.so.4.4.0
      /usr/local/lib/libopencv_videostab.so.4.4
      /usr/local/lib/libopencv_quality.so
      /usr/local/lib/libopencv_surface_matching.so
      /usr/local/lib/libopencv_gapi.so.4.4.0
      /usr/local/lib/libopencv_line_descriptor.so
      /usr/local/lib/libopencv_ml.so.4.4
      /usr/local/lib/libopencv_photo.so
      /usr/local/lib/libopencv_optflow.so
      /usr/local/lib/libopencv_alphamat.so.4.4.0
      /usr/local/lib/libopencv_phase_unwrapping.so.4.4
      /usr/local/lib/libopencv_xobjdetect.so.4.4.0
      /usr/local/lib/libopencv_aruco.so.4.4.0
      /usr/local/lib/libopencv_face.so
      /usr/local/lib/libopencv_core.so.4.4
      /usr/local/lib/libopencv_fuzzy.so.4.4.0
      /usr/local/lib/libopencv_videostab.so.4.4.0
      /usr/local/lib/libopencv_stitching.so
      /usr/local/lib/libopencv_dnn.so.4.4
      /usr/local/lib/libopencv_photo.so.4.4.0
      /usr/local/lib/libopencv_ximgproc.so.4.4.0
      /usr/local/lib/libopencv_optflow.so.4.4
      /usr/local/lib/libopencv_aruco.so
      /usr/local/lib/libopencv_reg.so
      /usr/local/lib/libopencv_saliency.so.4.4
      /usr/local/lib/libopencv_datasets.so
      /usr/local/lib/libopencv_xobjdetect.so
      /usr/local/lib/libopencv_ccalib.so.4.4
      /usr/local/lib/libopencv_rgbd.so.4.4
      /usr/local/lib/libopencv_plot.so.4.4
      /usr/local/lib/libopencv_objdetect.so.4.4
      /usr/local/lib/libopencv_structured_light.so.4.4.0
      /usr/local/lib/libopencv_superres.so
      /usr/local/lib/libopencv_video.so
      /usr/local/lib/libopencv_tracking.so.4.4
      /usr/local/lib/libopencv_ximgproc.so.4.4
      /usr/local/lib/libopencv_imgproc.so.4.4
      /usr/local/lib/libopencv_features2d.so.4.4
      /usr/local/lib/libopencv_imgcodecs.so.4.4.0
      /usr/local/lib/libopencv_line_descriptor.so.4.4
      /usr/local/lib/libopencv_dnn_superres.so.4.4
      /usr/local/lib/libopencv_core.so
      /usr/share/doc/libopencv3.2-java
      /usr/share/doc/libopencv3.2-java/changelog.Debian.gz
      /usr/share/doc/libopencv3.2-java/copyright
      /usr/share/doc/libopencv-viz-dev
      /usr/share/doc/libopencv-viz-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-viz-dev/copyright
      /usr/share/doc/libopencv-core3.2
      /usr/share/doc/libopencv-core3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-core3.2/copyright
      /usr/share/doc/libopencv-video3.2
      /usr/share/doc/libopencv-video3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-video3.2/copyright
      /usr/share/doc/libopencv-videoio-dev
      /usr/share/doc/libopencv-videoio-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-videoio-dev/copyright
      /usr/share/doc/libopencv-photo-dev
      /usr/share/doc/libopencv-photo-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-photo-dev/README.Debian
      /usr/share/doc/libopencv-photo-dev/copyright
      /usr/share/doc/libopencv-stitching-dev
      /usr/share/doc/libopencv-stitching-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-stitching-dev/README.Debian
      /usr/share/doc/libopencv-stitching-dev/copyright
      /usr/share/doc/libopencv-videostab-dev
      /usr/share/doc/libopencv-videostab-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-videostab-dev/README.Debian
      /usr/share/doc/libopencv-videostab-dev/copyright
      /usr/share/doc/libopencv-contrib-dev
      /usr/share/doc/libopencv-contrib-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-contrib-dev/README.Debian
      /usr/share/doc/libopencv-contrib-dev/copyright
      /usr/share/doc/libopencv-imgcodecs-dev
      /usr/share/doc/libopencv-imgcodecs-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-imgcodecs-dev/copyright
      /usr/share/doc/libopencv-videostab3.2
      /usr/share/doc/libopencv-videostab3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-videostab3.2/copyright
      /usr/share/doc/libopencv-imgcodecs3.2
      /usr/share/doc/libopencv-imgcodecs3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-imgcodecs3.2/copyright
      /usr/share/doc/libopencv-superres3.2
      /usr/share/doc/libopencv-superres3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-superres3.2/copyright
      /usr/share/doc/libopencv-imgproc-dev
      /usr/share/doc/libopencv-imgproc-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-imgproc-dev/README.Debian
      /usr/share/doc/libopencv-imgproc-dev/copyright
      /usr/share/doc/libopencv-contrib3.2
      /usr/share/doc/libopencv-contrib3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-contrib3.2/copyright
      /usr/share/doc/libopencv-shape3.2
      /usr/share/doc/libopencv-shape3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-shape3.2/copyright
      /usr/share/doc/libopencv-viz3.2
      /usr/share/doc/libopencv-viz3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-viz3.2/copyright
      /usr/share/doc/libopencv-ml-dev
      /usr/share/doc/libopencv-ml-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-ml-dev/README.Debian
      /usr/share/doc/libopencv-ml-dev/copyright
      /usr/share/doc/libopencv-highgui3.2
      /usr/share/doc/libopencv-highgui3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-highgui3.2/copyright
      /usr/share/doc/libopencv-flann-dev
      /usr/share/doc/libopencv-flann-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-flann-dev/README.Debian
      /usr/share/doc/libopencv-flann-dev/copyright
      /usr/share/doc/libopencv-ml3.2
      /usr/share/doc/libopencv-ml3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-ml3.2/copyright
      /usr/share/doc/libopencv-ts-dev
      /usr/share/doc/libopencv-ts-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-ts-dev/README.Debian
      /usr/share/doc/libopencv-ts-dev/copyright
      /usr/share/doc/libopencv-features2d-dev
      /usr/share/doc/libopencv-features2d-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-features2d-dev/README.Debian
      /usr/share/doc/libopencv-features2d-dev/copyright
      /usr/share/doc/libopencv3.2-jni
      /usr/share/doc/libopencv3.2-jni/changelog.Debian.gz
      /usr/share/doc/libopencv3.2-jni/copyright
      /usr/share/doc/libopencv-video-dev
      /usr/share/doc/libopencv-video-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-video-dev/README.Debian
      /usr/share/doc/libopencv-video-dev/copyright
      /usr/share/doc/libopencv-shape-dev
      /usr/share/doc/libopencv-shape-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-shape-dev/copyright
      /usr/share/doc/libopencv-highgui-dev
      /usr/share/doc/libopencv-highgui-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-highgui-dev/README.Debian
      /usr/share/doc/libopencv-highgui-dev/copyright
      /usr/share/doc/libopencv-calib3d3.2
      /usr/share/doc/libopencv-calib3d3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-calib3d3.2/copyright
      /usr/share/doc/libopencv-objdetect-dev
      /usr/share/doc/libopencv-objdetect-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-objdetect-dev/README.Debian
      /usr/share/doc/libopencv-objdetect-dev/copyright
      /usr/share/doc/libopencv-calib3d-dev
      /usr/share/doc/libopencv-calib3d-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-calib3d-dev/README.Debian
      /usr/share/doc/libopencv-calib3d-dev/copyright
      /usr/share/doc/libopencv-core-dev
      /usr/share/doc/libopencv-core-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-core-dev/README.Debian
      /usr/share/doc/libopencv-core-dev/copyright
      /usr/share/doc/libopencv-superres-dev
      /usr/share/doc/libopencv-superres-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-superres-dev/README.Debian
      /usr/share/doc/libopencv-superres-dev/copyright
      /usr/share/doc/libopencv-photo3.2
      /usr/share/doc/libopencv-photo3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-photo3.2/copyright
      /usr/share/doc/libopencv-stitching3.2
      /usr/share/doc/libopencv-stitching3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-stitching3.2/copyright
      /usr/share/doc/libopencv-videoio3.2
      /usr/share/doc/libopencv-videoio3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-videoio3.2/copyright
      /usr/share/doc/libopencv-imgproc3.2
      /usr/share/doc/libopencv-imgproc3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-imgproc3.2/copyright
      /usr/share/doc/libopencv-flann3.2
      /usr/share/doc/libopencv-flann3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-flann3.2/copyright
      /usr/share/doc/libopencv-features2d3.2
      /usr/share/doc/libopencv-features2d3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-features2d3.2/copyright
      /usr/share/doc/libopencv-objdetect3.2
      /usr/share/doc/libopencv-objdetect3.2/changelog.Debian.gz
      /usr/share/doc/libopencv-objdetect3.2/copyright
      /usr/share/doc/libopencv-dev
      /usr/share/doc/libopencv-dev/changelog.Debian.gz
      /usr/share/doc/libopencv-dev/copyright
      /usr/share/lintian/overrides/libopencv-contrib3.2
      /usr/share/lintian/overrides/libopencv3.2-jni
      /usr/lib/jni/libopencv_java320.so
      /usr/lib/arm-linux-gnueabihf/libopencv_ximgproc.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_videoio.so
      /usr/lib/arm-linux-gnueabihf/libopencv_shape.a
      /usr/lib/arm-linux-gnueabihf/libopencv_freetype.so
      /usr/lib/arm-linux-gnueabihf/libopencv_hdf.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_face.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_text.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_bgsegm.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_xphoto.a
      /usr/lib/arm-linux-gnueabihf/libopencv_phase_unwrapping.a
      /usr/lib/arm-linux-gnueabihf/libopencv_stitching.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_phase_unwrapping.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_photo.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_objdetect.a
      /usr/lib/arm-linux-gnueabihf/libopencv_viz.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_plot.so
      /usr/lib/arm-linux-gnueabihf/libopencv_videoio.a
      /usr/lib/arm-linux-gnueabihf/libopencv_objdetect.so
      /usr/lib/arm-linux-gnueabihf/libopencv_features2d.a
      /usr/lib/arm-linux-gnueabihf/libopencv_imgproc.so
      /usr/lib/arm-linux-gnueabihf/libopencv_objdetect.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_plot.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_freetype.a
      /usr/lib/arm-linux-gnueabihf/libopencv_calib3d.a
      /usr/lib/arm-linux-gnueabihf/libopencv_saliency.so
      /usr/lib/arm-linux-gnueabihf/libopencv_xphoto.so
      /usr/lib/arm-linux-gnueabihf/libopencv_aruco.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_bgsegm.so
      /usr/lib/arm-linux-gnueabihf/libopencv_stitching.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_line_descriptor.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_videoio.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_rgbd.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_shape.so
      /usr/lib/arm-linux-gnueabihf/libopencv_dpm.so
      /usr/lib/arm-linux-gnueabihf/libopencv_shape.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_objdetect.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_optflow.a
      /usr/lib/arm-linux-gnueabihf/libopencv_ximgproc.so
      /usr/lib/arm-linux-gnueabihf/libopencv_stereo.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_calib3d.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_text.a
      /usr/lib/arm-linux-gnueabihf/libopencv_viz.a
      /usr/lib/arm-linux-gnueabihf/libopencv_face.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_calib3d.so
      /usr/lib/arm-linux-gnueabihf/libopencv_dpm.a
      /usr/lib/arm-linux-gnueabihf/libopencv_freetype.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_ccalib.so
      /usr/lib/arm-linux-gnueabihf/libopencv_surface_matching.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_surface_matching.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_xobjdetect.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_rgbd.so
      /usr/lib/arm-linux-gnueabihf/libopencv_text.so
      /usr/lib/arm-linux-gnueabihf/libopencv_saliency.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_ximgproc.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_freetype.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_phase_unwrapping.so
      /usr/lib/arm-linux-gnueabihf/libopencv_videoio.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_fuzzy.so
      /usr/lib/arm-linux-gnueabihf/libopencv_fuzzy.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_stereo.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_aruco.a
      /usr/lib/arm-linux-gnueabihf/libopencv_video.a
      /usr/lib/arm-linux-gnueabihf/libopencv_imgcodecs.a
      /usr/lib/arm-linux-gnueabihf/libopencv_highgui.so
      /usr/lib/arm-linux-gnueabihf/libopencv_shape.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_imgcodecs.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_xobjdetect.a
      /usr/lib/arm-linux-gnueabihf/libopencv_datasets.a
      /usr/lib/arm-linux-gnueabihf/libopencv_hdf.a
      /usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_fuzzy.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_calib3d.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_phase_unwrapping.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_bioinspired.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_reg.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_text.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_videostab.a
      /usr/lib/arm-linux-gnueabihf/libopencv_highgui.a
      /usr/lib/arm-linux-gnueabihf/libopencv_ml.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_structured_light.so
      /usr/lib/arm-linux-gnueabihf/libopencv_flann.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_reg.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_stereo.a
      /usr/lib/arm-linux-gnueabihf/libopencv_superres.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_ml.so
      /usr/lib/arm-linux-gnueabihf/libopencv_flann.so
      /usr/lib/arm-linux-gnueabihf/libopencv_bioinspired.so
      /usr/lib/arm-linux-gnueabihf/libopencv_imgcodecs.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_structured_light.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_bioinspired.a
      /usr/lib/arm-linux-gnueabihf/libopencv_dpm.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_saliency.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_ximgproc.a
      /usr/lib/arm-linux-gnueabihf/libopencv_ccalib.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_features2d.so
      /usr/lib/arm-linux-gnueabihf/libopencv_saliency.a
      /usr/lib/arm-linux-gnueabihf/libopencv_features2d.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_viz.so
      /usr/lib/arm-linux-gnueabihf/libopencv_core.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_stereo.so
      /usr/lib/arm-linux-gnueabihf/libopencv_superres.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_structured_light.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_imgproc.a
      /usr/lib/arm-linux-gnueabihf/libopencv_video.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_line_descriptor.a
      /usr/lib/arm-linux-gnueabihf/libopencv_line_descriptor.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_bioinspired.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_videostab.so
      /usr/lib/arm-linux-gnueabihf/libopencv_hdf.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_ts.a
      /usr/lib/arm-linux-gnueabihf/libopencv_xphoto.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_imgcodecs.so
      /usr/lib/arm-linux-gnueabihf/libopencv_ccalib.a
      /usr/lib/arm-linux-gnueabihf/libopencv_surface_matching.so
      /usr/lib/arm-linux-gnueabihf/libopencv_ml.a
      /usr/lib/arm-linux-gnueabihf/libopencv_aruco.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_line_descriptor.so
      /usr/lib/arm-linux-gnueabihf/libopencv_xphoto.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_superres.a
      /usr/lib/arm-linux-gnueabihf/libopencv_photo.so
      /usr/lib/arm-linux-gnueabihf/libopencv_optflow.so
      /usr/lib/arm-linux-gnueabihf/libopencv_imgproc.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_ml.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_plot.a
      /usr/lib/arm-linux-gnueabihf/libopencv_optflow.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_features2d.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_datasets.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_stitching.a
      /usr/lib/arm-linux-gnueabihf/libopencv_optflow.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_face.so
      /usr/lib/arm-linux-gnueabihf/libopencv_photo.a
      /usr/lib/arm-linux-gnueabihf/libopencv_stitching.so
      /usr/lib/arm-linux-gnueabihf/libopencv_dpm.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_photo.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_hdf.so
      /usr/lib/arm-linux-gnueabihf/libopencv_fuzzy.a
      /usr/lib/arm-linux-gnueabihf/libopencv_core.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_aruco.so
      /usr/lib/arm-linux-gnueabihf/libopencv_viz.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_reg.so
      /usr/lib/arm-linux-gnueabihf/libopencv_structured_light.a
      /usr/lib/arm-linux-gnueabihf/libopencv_flann.a
      /usr/lib/arm-linux-gnueabihf/libopencv_bgsegm.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_bgsegm.a
      /usr/lib/arm-linux-gnueabihf/libopencv_datasets.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_datasets.so
      /usr/lib/arm-linux-gnueabihf/libopencv_xobjdetect.so
      /usr/lib/arm-linux-gnueabihf/libopencv_plot.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_surface_matching.a
      /usr/lib/arm-linux-gnueabihf/libopencv_xobjdetect.so.3.2
      /usr/lib/arm-linux-gnueabihf/libopencv_imgproc.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_superres.so
      /usr/lib/arm-linux-gnueabihf/libopencv_core.a
      /usr/lib/arm-linux-gnueabihf/libopencv_video.so
      /usr/lib/arm-linux-gnueabihf/libopencv_face.a
      /usr/lib/arm-linux-gnueabihf/libopencv_flann.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_video.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_rgbd.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_reg.a
      /usr/lib/arm-linux-gnueabihf/libopencv_ccalib.so.3.2.0
      /usr/lib/arm-linux-gnueabihf/libopencv_core.so
      /usr/lib/arm-linux-gnueabihf/libopencv_rgbd.a

      find /usr | grep libopencv 이렇게 검색했을때에 위에 파일목록입니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.09.25 21:21 신고

      다음 처럼 지우세요
      라이브러리만 지우면 됩니다.

      sudo rm /usr/lib/arm-linux-gnueabihf/libopencv_*3.2

      sudo rm /usr/lib/arm-linux-gnueabihf/libopencv_*3.2.0

  9. thumbnail
    liberty67
    2020.10.21 14:35

    좋은 정보 감사합니다.
    우분투 18.04에서 4.4.0을 설치하고 있는데 올바르게 설치하고 pkg-config --modversion opencv 명령어를 입력해도
    설치하지 않은 상태라고 나오는데 혹시 어떤 문제일까요??
    pkg-config --cflags opencv 명령어를 입력해도 같은 상황입니다.
    Package opencv was not found in the pkg-config search path.
    Perhaps you should add the directory containing `opencv.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'opencv' found

  10. thumbnail
    안녕하세요
    2020.11.02 23:32

    안녕하세요, 감사하게 포스팅에 도움받아 OPENCV 설치 후 pkg-config --modversion opencv4 해도 확인이 되지 않아 질문드립니다,,
    cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local/bin \
    -D WITH_TBB=OFF \
    -D WITH_IPP=OFF \
    -D WITH_1394=OFF \
    -D BUILD_WITH_DEBUG_INFO=OFF \
    -D BUILD_DOCS=OFF \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=OFF \
    -D BUILD_TESTS=OFF \
    -D BUILD_PERF_TESTS=OFF \
    -D WITH_QT=OFF \
    -D WITH_GTK=ON \
    -D WITH_OPENGL=ON \
    -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.2.0/modules \
    -D WITH_V4L=ON \
    -D WITH_FFMPEG=ON \
    -D WITH_XINE=ON \
    -D BUILD_NEW_PYTHON_SUPPORT=ON \
    -D OPENCV_GENERATE_PKGCONFIG=ON \
    -D PYTHON2_INCLUDE_DIR=/usr/include/python2.7 \
    -D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include/ \
    -D PYTHON2_PACKAGES_PATH=/usr/lib/python2.7/dist-packages \
    -D PYTHON2_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so \
    -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \
    -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include/ \
    -D PYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \
    -D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
    -D CUDA_NVCC_FLAGS=--expt-relaxed-constexpr \
    ../
    다음과 같이 flag를 입력후에 make, sudo make install 이후 과정 또한 오류없이 진행해서 설치되었다고 생각했는데 확인이 되질 않네요 ㅠㅠ 혹시 도움 얻을 수 있을까요?

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.11.03 22:06 신고

      다음처럼 검색했을때 다음 위치에 opencv4.pc가 있어야 합니다.
      없으면 빌드시 문제가 있는 것이며 다른 위치에 있다면 아래 처럼 복사해주세요

      webnautes@webnautes-pc:~$ sudo find / | grep opencv4.pc
      /usr/local/lib/pkgconfig/opencv4.pc

  11. thumbnail
    Favicon of https://deepflowest.tistory.com BlogIcon Orange57

    안녕하세요. 위 과정을 따라서 설치까지 다 진행하였는데, 마지막에 import cv2 하는 부분에서 다음과 같은 에러가 뜹니다.

    ImportError: libopencv_quality.so.4.2: cannot open shared object file: No such file or directory

    혹시 어느 부분에서 문제가 생긴건지 알려주실 수 있나요??

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.11.17 11:00 신고

      find와 grep 명령으로 위 파일이 존재하나 검색해보세요

      find /usr | grep libopencv_quality

  12. thumbnail
    Favicon of https://deepflowest.tistory.com BlogIcon Orange57

    # pkg-config --modversion opencv
    3.4.2
    # python3
    Python 3.8.5 | packaged by conda-forge | (default, Sep 24 2020, 16:55:52)
    [GCC 7.5.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cv2
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'cv2'

    안녕하세요 글 내용 따라서 opencv 3.4.2 버전을 잘 설치했습니다.
    그런데 위 내용 처럼 pkg-config --modversion opencv 명령어에 대해서는 3.4.2로 잘 출력이 되는데,

    python 안에서 import cv2 입력 시 cv2가 없다고 오류가 뜹니다.
    어떻게 해결해야 하는 지 도움 주실 수 있을까요?

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.12.14 17:59 신고

      파이썬용이 잘못 설치된듯합니다.

      포스트에서 다음 부분을 확인하거나

      다음처럼 Python 2 또는 Python 3 라이브러리 항목이 보이지 않는 경우에는   


      다음 명령으로 파이썬용을 설치하세요

      pip3 install opencv-contrib-python

    • thumbnail
      Favicon of https://deepflowest.tistory.com BlogIcon Orange57
      2020.12.14 18:08 신고

      Python 2 또는 Python 3 라이브러리 항목은 있는 것을 확인했고,

      pip3 install opencv-contrib-python 설치하고 다시 import cv2 한 결과,

      ImportError: libopencv_quality.so.4.2: cannot open shared object file: No such file or directory
      이와 같은 오류가 뜹니다.

      그래서
      find /usr | grep libopencv_quality 명령어를 입력한 결과 아무것도 뜨지 않는 것을 확인했는데, 그 다음에 어떻게 해야하는 지 알려주실 수 있나요?

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.12.14 18:40 신고

      두가지 버전의 OpenCV 라이브러리가 설치된듯합니다. 다음 명령으로 검색시 뜨는 버전을 확인해보세요

      find /usr | grep libopencv


      예를 들어 OpenCV 4.4인 경우 다음처럼 출력됩니다.

      /usr/local/lib/libopencv_xobjdetect.so.4.4
      /usr/local/lib/libopencv_superres.so.4.4.0
      /usr/local/lib/libopencv_objdetect.so
      /usr/local/lib/libopencv_saliency.so.4.4.0
      /usr/local/lib/libopencv_tracking.so.4.4.0
      /usr/local/lib/libopencv_shape.so.4.4.0
      /usr/local/lib/libopencv_core.so.4.4.0

    • thumbnail
      Favicon of https://deepflowest.tistory.com BlogIcon Orange57
      2020.12.14 21:00 신고

      find /usr | grep libopencv 입력 시
      다음과 같이 3.4만 뜹니다,,
      두 버전은 아닌 것 같은데 왜 오류가 날까요,,,?

      /usr/local/lib/libopencv_hfs.so
      /usr/local/lib/libopencv_flann.so.3.4
      /usr/local/lib/libopencv_objdetect.so.3.4
      /usr/local/lib/libopencv_rgbd.so
      /usr/local/lib/libopencv_bioinspired.so.3.4
      /usr/local/lib/libopencv_ccalib.so.3.4
      /usr/local/lib/libopencv_superres.so.3.4
      /usr/local/lib/libopencv_datasets.so.3.4
      /usr/local/lib/libopencv_bgsegm.so.3.4.2
      /usr/local/lib/libopencv_structured_light.so.3.4
      /usr/local/lib/libopencv_ximgproc.so.3.4.2
      /usr/local/lib/libopencv_surface_matching.so
      /usr/local/lib/libopencv_bioinspired.so.3.4.2
      /usr/local/lib/libopencv_rgbd.so.3.4
      /usr/local/lib/libopencv_optflow.so
      /usr/local/lib/libopencv_highgui.so
      /usr/local/lib/libopencv_optflow.so.3.4.2
      /usr/local/lib/libopencv_surface_matching.so.3.4.2
      /usr/local/lib/libopencv_img_hash.so
      /usr/local/lib/libopencv_face.so.3.4
      /usr/local/lib/libopencv_reg.so
      /usr/local/lib/libopencv_hfs.so.3.4
      /usr/local/lib/libopencv_videostab.so.3.4
      /usr/local/lib/libopencv_objdetect.so
      /usr/local/lib/libopencv_dnn.so.3.4
      /usr/local/lib/libopencv_plot.so.3.4.2
      /usr/local/lib/libopencv_aruco.so
      /usr/local/lib/libopencv_plot.so.3.4
      /usr/local/lib/libopencv_dnn.so
      /usr/local/lib/libopencv_ml.so
      /usr/local/lib/libopencv_phase_unwrapping.so.3.4
      /usr/local/lib/libopencv_dpm.so
      /usr/local/lib/libopencv_core.so
      /usr/local/lib/libopencv_xobjdetect.so.3.4
      /usr/local/lib/libopencv_features2d.so.3.4.2
      /usr/local/lib/libopencv_core.so.3.4
      /usr/local/lib/libopencv_bioinspired.so
      /usr/local/lib/libopencv_xobjdetect.so
      /usr/local/lib/libopencv_saliency.so.3.4.2
      /usr/local/lib/libopencv_calib3d.so.3.4.2
      /usr/local/lib/libopencv_imgcodecs.so.3.4.2
      /usr/local/lib/libopencv_ccalib.so
      /usr/local/lib/libopencv_phase_unwrapping.so.3.4.2
      /usr/local/lib/libopencv_aruco.so.3.4.2
      /usr/local/lib/libopencv_photo.so.3.4.2
      /usr/local/lib/libopencv_stereo.so
      /usr/local/lib/libopencv_dnn.so.3.4.2
      /usr/local/lib/libopencv_xobjdetect.so.3.4.2
      /usr/local/lib/libopencv_saliency.so.3.4
      /usr/local/lib/libopencv_img_hash.so.3.4.2
      /usr/local/lib/libopencv_freetype.so
      /usr/local/lib/libopencv_dnn_objdetect.so.3.4.2
      /usr/local/lib/libopencv_reg.so.3.4
      /usr/local/lib/libopencv_stitching.so
      /usr/local/lib/libopencv_fuzzy.so
      /usr/local/lib/libopencv_line_descriptor.so.3.4.2
      /usr/local/lib/libopencv_video.so
      /usr/local/lib/libopencv_dnn_objdetect.so
      /usr/local/lib/libopencv_photo.so
      /usr/local/lib/libopencv_datasets.so
      /usr/local/lib/libopencv_stereo.so.3.4.2
      /usr/local/lib/libopencv_ximgproc.so
      /usr/local/lib/libopencv_bgsegm.so
      /usr/local/lib/libopencv_datasets.so.3.4.2
      /usr/local/lib/libopencv_video.so.3.4
      /usr/local/lib/libopencv_ximgproc.so.3.4
      /usr/local/lib/libopencv_structured_light.so.3.4.2
      /usr/local/lib/libopencv_ml.so.3.4
      /usr/local/lib/libopencv_videoio.so.3.4
      /usr/local/lib/libopencv_tracking.so
      /usr/local/lib/libopencv_videostab.so.3.4.2
      /usr/local/lib/libopencv_bgsegm.so.3.4
      /usr/local/lib/libopencv_text.so.3.4.2
      /usr/local/lib/libopencv_video.so.3.4.2
      /usr/local/lib/libopencv_freetype.so.3.4.2
      /usr/local/lib/libopencv_stitching.so.3.4
      /usr/local/lib/libopencv_structured_light.so
      /usr/local/lib/libopencv_dpm.so.3.4
      /usr/local/lib/libopencv_face.so
      /usr/local/lib/libopencv_videoio.so.3.4.2
      /usr/local/lib/libopencv_dpm.so.3.4.2
      /usr/local/lib/libopencv_flann.so
      /usr/local/lib/libopencv_calib3d.so.3.4
      /usr/local/lib/libopencv_imgcodecs.so.3.4
      /usr/local/lib/libopencv_ccalib.so.3.4.2
      /usr/local/lib/libopencv_imgcodecs.so
      /usr/local/lib/libopencv_line_descriptor.so.3.4
      /usr/local/lib/libopencv_plot.so
      /usr/local/lib/libopencv_shape.so.3.4
      /usr/local/lib/libopencv_text.so.3.4
      /usr/local/lib/libopencv_highgui.so.3.4
      /usr/local/lib/libopencv_shape.so
      /usr/local/lib/libopencv_superres.so.3.4.2
      /usr/local/lib/libopencv_imgproc.so.3.4
      /usr/local/lib/libopencv_xphoto.so
      /usr/local/lib/libopencv_tracking.so.3.4.2
      /usr/local/lib/libopencv_phase_unwrapping.so
      /usr/local/lib/libopencv_flann.so.3.4.2
      /usr/local/lib/libopencv_videoio.so
      /usr/local/lib/libopencv_line_descriptor.so
      /usr/local/lib/libopencv_face.so.3.4.2
      /usr/local/lib/libopencv_ml.so.3.4.2
      /usr/local/lib/libopencv_xfeatures2d.so
      /usr/local/lib/libopencv_stitching.so.3.4.2
      /usr/local/lib/libopencv_saliency.so
      /usr/local/lib/libopencv_freetype.so.3.4
      /usr/local/lib/libopencv_text.so
      /usr/local/lib/libopencv_xfeatures2d.so.3.4.2
      /usr/local/lib/libopencv_rgbd.so.3.4.2
      /usr/local/lib/libopencv_photo.so.3.4
      /usr/local/lib/libopencv_features2d.so
      /usr/local/lib/libopencv_xphoto.so.3.4
      /usr/local/lib/libopencv_img_hash.so.3.4
      /usr/local/lib/libopencv_shape.so.3.4.2
      /usr/local/lib/libopencv_reg.so.3.4.2
      /usr/local/lib/libopencv_xphoto.so.3.4.2
      /usr/local/lib/libopencv_fuzzy.so.3.4.2
      /usr/local/lib/libopencv_videostab.so
      /usr/local/lib/libopencv_objdetect.so.3.4.2
      /usr/local/lib/libopencv_fuzzy.so.3.4
      /usr/local/lib/libopencv_superres.so
      /usr/local/lib/libopencv_calib3d.so
      /usr/local/lib/libopencv_highgui.so.3.4.2
      /usr/local/lib/libopencv_xfeatures2d.so.3.4
      /usr/local/lib/libopencv_dnn_objdetect.so.3.4
      /usr/local/lib/libopencv_core.so.3.4.2
      /usr/local/lib/libopencv_hfs.so.3.4.2
      /usr/local/lib/libopencv_imgproc.so.3.4.2
      /usr/local/lib/libopencv_surface_matching.so.3.4
      /usr/local/lib/libopencv_tracking.so.3.4
      /usr/local/lib/libopencv_imgproc.so
      /usr/local/lib/libopencv_features2d.so.3.4
      /usr/local/lib/libopencv_optflow.so.3.4
      /usr/local/lib/libopencv_stereo.so.3.4
      /usr/local/lib/libopencv_aruco.so.3.4

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.12.14 21:47 신고

      다음처럼 Python용 OpenCV가 있나 확인해보세요.

      $ find /usr | grep cv2.*
      ..............................
      /usr/local/lib/python3.8/dist-packages/cv2.cpython-38-x86_64-linux-gnu.so


      보통 opencv-contrib-python를 설치하면 사용가능해지는데 알 수 없구요.

    • thumbnail
      Favicon of https://deepflowest.tistory.com BlogIcon Orange57
      2020.12.15 13:33 신고

      다 삭제 후 다시 설치할 때
      pip3 install opencv-contrib-python 입력하니까 깔끔하게 해결 되었습니다.

      도움 주셔서 감사드립니다.

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2020.12.15 14:30 신고

      해결되서 다행입니다

  13. thumbnail
    Favicon of https://leegeunhyeok.tistory.com BlogIcon Dev_Lee_GH

    안녕하세요. 블로그를 보고 설치중 에러가 발생해 문의드립니다.
    sudo make install 실행시

    -- Install configuration: "RELEASE"
    -- Up-to-date: /usr/local/share/licenses/opencv4/opencl-headers-LICENSE.txt
    -- Up-to-date: /usr/local/include/opencv4/opencv2/cvconfig.h
    -- Up-to-date: /usr/local/include/opencv4/opencv2/opencv_modules.hpp
    CMake Error at cmake_install.cmake:53 (file):
    file INSTALL destination: /usr/local/lib/pkgconfig is not a directory.
    에러가 출력되어 /usr/../pkgconfig를 확인하였는데 디렉토리가 아니라 읽기전용 파일로 나오네요.. 혹시 해결방법 알고 계신가요..?

  14. thumbnail
    Favicon of https://membejoin.tistory.com BlogIcon 초보지만열심히

    제가 컴파일을 하니 #include <opencv2/opencv.hpp> 에서 에러가 뜨게 되어 질문 드립니다.. ㅠㅠ..
    밑에서 같은 유형의 오류를 찾아서 pkg-config opencv4 --libs --cflags 명령어를 실행해 보았는데
    -I/usr/local/include/opencv4/opencv -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_highgui -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_viz -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core
    이렇게 뜨게 되는데 앞 부분에서 opencv가 아니라 opencv2가 나타나야 정상인 것 같아 어떻게 하면 해결이 되는지에 대해 질문 드립니다. ㅠㅠ!

  15. thumbnail
    Favicon of https://vanwolha.tistory.com BlogIcon 반월하

    안녕하세요 opencv설치에 오류가 많아 질문드리고 싶습니다
    현재 unbunto 18.0.4사용하고 있고 anaconda환경입니다.
    cmake로 설정중에 Python 3 라이브러리 항목이 보이지 않아
    cmake python3 관련 코드를 (
    cmake -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \ -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include/ \ -D PYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \ -D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \)
    이것을 진행했는데 CMake Error: The source directory "/home/piai/opencv/opencv-4.2.0/build/PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so" does not exist. 라고 오류 메세지가 뜹니다..
    직접 libpython3.6m.so를 찾아서 sudo cp를 이용해서 usr/lib/x86_64-linux-gnu 폴더안에 옮겨주었는데도 같은 오류메세지가 나오는데 혹시 해결법을 아시나요? 도움주시면 정말 감사하겠습니다 ㅠㅠ

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.04.09 06:19 신고

      so파일이 존재하는 위치를 입력해보세요

    • thumbnail
      Favicon of https://vanwolha.tistory.com BlogIcon 반월하
      2021.04.09 13:28 신고

      네 그렇게 진행해보고 복사해서 위치를 다른 곳으로 하고도 경로를 지정해도 똑같은 오류가 나오네요..ㅠ
      위쪽에 댓글들을 보니 다 삭제후 pip3 install opencv-contrib-python을 입력하느 해결되었다는 내용이 있던데 저도 이것을 보고 똑같이 따라했는데도 cmake를 할 때 오류가 나오던데 혹시 다르게 해야하는건가요 전?

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.04.09 13:36 신고

      에러는 so파일을 못찾았다는 에러입니다. cmake 끝에 있는 역슬래시를 모두 지우고 빈칸으로 구별하여 한줄 명령으류 바꾸어서 해보세요. pip install opencv-contrib-python은 파이썬용 opencv를 설치하는 겁니다. 지금 포스트에는 영향을 주지 않습니다.

  16. thumbnail
    Favicon of https://p-garden.tistory.com BlogIcon p_garden

    순차적으로 진행한 후 time make -j4에서 Virtual box에서 Ubuntu사용중이라서 -j 만 주고 돌렸더니
    cc1: warning: '-Werror=' argument '-Werror=non-virtual-dtor' is not valid for C 라는 에러가 뜨면서 우분투 서버가 다운되버립니다.
    구글링 해도 명확한 해결법이 나오지 않아 질문해봅니다. 감사합니다.

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.05.06 05:56 신고

      time make -j라고 실행햤나요?

    • thumbnail
      Favicon of https://p-garden.tistory.com BlogIcon p_garden
      2021.05.06 16:21 신고

      네 그렇습니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.05.06 16:24 신고

      j뒤에 숫자를 적어야 하는걸로 알고 있습니다. 아니면 -j옵션을 빼고 해보세요

    • thumbnail
      Favicon of https://p-garden.tistory.com BlogIcon p_garden
      2021.05.06 16:51 신고

      make만 실행하니 cc1: warning: '-Werror=' argument '-Werror=non-virtual-dtor' is not valid for C와 함께 설치 퍼센트가 올라가며 시작되긴 하네요 빠른 답변 감사합니다.

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.05.06 16:52 신고

      다행입니다

    • thumbnail
      Favicon of https://p-garden.tistory.com BlogIcon p_garden
      2021.05.07 01:32 신고

      아직 설치를 못해서 다시 찾아뵙게 되었네요.. 혹시 99%에서 우분투가 멈추는건 무슨 이유에서 일까요..? build파일 지우고 반복 4번정도 시도 했으나 계속 99%에서 별다른 오류 메세지 없이 멈춰버리니 어떻게 해결해야 할지 모르겠네요 용량은 충분합니다

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.05.07 02:59 신고

      기다려보세요. 마지막에 시간이 더 걸릴수 있습니다

  17. thumbnail
    Favicon of https://jbeun.tistory.com BlogIcon 흑살려주세요흑

    안녕하세요! 블로그 항상 잘 보고 있습니다! 질문 몇가지 남깁니다!

    opencv 설치 전 pkg-config --modversion opencv 명령어로 우분투에 opencv가 깔리지 않은걸 확인했습니다.

    해당 게시물 따라서 opencv 설치 완료했구요, opencv 버전 확인 위해서 python2, python3으로 cv2 버전 확인했을때는 4.2.0으로 잘 나왔습니다.

    그런데 pkg-config --modversion opencv로 다시 확인해보니 3.2.0으로 나와서 여쭤봅니다!

    1. 우분투 깔자마자 pkg-config --modversion opencv 명령어로 확인했을 때 설치되어있지 않다고 나왔는데, 이미 내부에 설치되어 있을 확률이 있나요? ㅜㅜ

    2. find /usr | grep libopencv 명령어를 검색했을 때 다음과 같이 목록이 나옵니다.
    다른 댓글을 확인해보니 라이브러리 부분만 지우라고 하셨던데, 제가 가지고 있는 3.2 파일들은 지우지 않아도 되나요?
    혹시 지워야 한다면 지우는 명령어는 sudo rm /share/doc/libopencv_*3.2 맞을까요?

    /usr/lib/jni/libopencv_java320.so
    /usr/lib/x86_64-linux-gnu/libopencv_plot.so
    /usr/lib/x86_64-linux-gnu/libopencv_datasets.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_stereo.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_ml.so
    /usr/lib/x86_64-linux-gnu/libopencv_photo.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_face.so
    /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_video.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.so
    /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_optflow.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_xphoto.a
    /usr/lib/x86_64-linux-gnu/libopencv_flann.so
    /usr/lib/x86_64-linux-gnu/libopencv_viz.a
    /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_datasets.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_superres.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_videoio.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_viz.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.so
    /usr/lib/x86_64-linux-gnu/libopencv_aruco.so
    /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_face.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_shape.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_videostab.so
    /usr/lib/x86_64-linux-gnu/libopencv_flann.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_plot.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_reg.so
    /usr/lib/x86_64-linux-gnu/libopencv_shape.so
    /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_dpm.a
    /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.so
    /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.so
    /usr/lib/x86_64-linux-gnu/libopencv_plot.a
    /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.so
    /usr/lib/x86_64-linux-gnu/libopencv_video.a
    /usr/lib/x86_64-linux-gnu/libopencv_xphoto.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_ccalib.so
    /usr/lib/x86_64-linux-gnu/libopencv_ccalib.a
    /usr/lib/x86_64-linux-gnu/libopencv_features2d.so
    /usr/lib/x86_64-linux-gnu/libopencv_freetype.a
    /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so
    /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_videoio.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_superres.so
    /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_video.so
    /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_photo.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_saliency.so
    /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so
    /usr/lib/x86_64-linux-gnu/libopencv_text.a
    /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_stitching.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_ml.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.a
    /usr/lib/x86_64-linux-gnu/libopencv_text.so
    /usr/lib/x86_64-linux-gnu/libopencv_core.a
    /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.a
    /usr/lib/x86_64-linux-gnu/libopencv_stereo.a
    /usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_optflow.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_structured_light.so
    /usr/lib/x86_64-linux-gnu/libopencv_objdetect.a
    /usr/lib/x86_64-linux-gnu/libopencv_plot.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_structured_light.a
    /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_optflow.a
    /usr/lib/x86_64-linux-gnu/libopencv_datasets.so
    /usr/lib/x86_64-linux-gnu/libopencv_aruco.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_aruco.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.a
    /usr/lib/x86_64-linux-gnu/libopencv_rgbd.a
    /usr/lib/x86_64-linux-gnu/libopencv_core.so
    /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_videoio.so
    /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.so
    /usr/lib/x86_64-linux-gnu/libopencv_video.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_xphoto.so
    /usr/lib/x86_64-linux-gnu/libopencv_photo.a
    /usr/lib/x86_64-linux-gnu/libopencv_flann.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_videoio.a
    /usr/lib/x86_64-linux-gnu/libopencv_ml.a
    /usr/lib/x86_64-linux-gnu/libopencv_rgbd.so
    /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.so
    /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.a
    /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_calib3d.a
    /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_reg.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_ccalib.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_text.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_stereo.so
    /usr/lib/x86_64-linux-gnu/libopencv_dpm.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_face.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.a
    /usr/lib/x86_64-linux-gnu/libopencv_superres.a
    /usr/lib/x86_64-linux-gnu/libopencv_videostab.a
    /usr/lib/x86_64-linux-gnu/libopencv_stereo.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_rgbd.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_highgui.a
    /usr/lib/x86_64-linux-gnu/libopencv_ccalib.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.so
    /usr/lib/x86_64-linux-gnu/libopencv_saliency.a
    /usr/lib/x86_64-linux-gnu/libopencv_reg.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_shape.a
    /usr/lib/x86_64-linux-gnu/libopencv_dpm.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_viz.so
    /usr/lib/x86_64-linux-gnu/libopencv_ml.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so
    /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so
    /usr/lib/x86_64-linux-gnu/libopencv_stitching.a
    /usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_dpm.so
    /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.a
    /usr/lib/x86_64-linux-gnu/libopencv_hdf.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_hdf.a
    /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.a
    /usr/lib/x86_64-linux-gnu/libopencv_reg.a
    /usr/lib/x86_64-linux-gnu/libopencv_freetype.so
    /usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.a
    /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_xphoto.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_saliency.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_rgbd.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_optflow.so
    /usr/lib/x86_64-linux-gnu/libopencv_highgui.so
    /usr/lib/x86_64-linux-gnu/libopencv_flann.a
    /usr/lib/x86_64-linux-gnu/libopencv_stitching.so
    /usr/lib/x86_64-linux-gnu/libopencv_shape.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_structured_light.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_saliency.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.a
    /usr/lib/x86_64-linux-gnu/libopencv_features2d.a
    /usr/lib/x86_64-linux-gnu/libopencv_ts.a
    /usr/lib/x86_64-linux-gnu/libopencv_features2d.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_text.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_structured_light.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_viz.so.3.2.0
    /usr/lib/x86_64-linux-gnu/libopencv_hdf.so
    /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_imgproc.a
    /usr/lib/x86_64-linux-gnu/libopencv_features2d.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_hdf.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_stitching.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_superres.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_aruco.a
    /usr/lib/x86_64-linux-gnu/libopencv_datasets.a
    /usr/lib/x86_64-linux-gnu/libopencv_photo.so
    /usr/lib/x86_64-linux-gnu/libopencv_face.a
    /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.3.2
    /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.so.3.2.0
    /usr/local/lib/libopencv_plot.so
    /usr/local/lib/libopencv_fuzzy.so.4.2.0
    /usr/local/lib/libopencv_ml.so
    /usr/local/lib/libopencv_xobjdetect.so.4.2.0
    /usr/local/lib/libopencv_face.so
    /usr/local/lib/libopencv_xobjdetect.so
    /usr/local/lib/libopencv_xfeatures2d.so
    /usr/local/lib/libopencv_hdf.so.4.2.0
    /usr/local/lib/libopencv_hfs.so
    /usr/local/lib/libopencv_flann.so
    /usr/local/lib/libopencv_surface_matching.so.4.2
    /usr/local/lib/libopencv_face.so.4.2.0
    /usr/local/lib/libopencv_calib3d.so.4.2.0
    /usr/local/lib/libopencv_flann.so.4.2.0
    /usr/local/lib/libopencv_bioinspired.so
    /usr/local/lib/libopencv_aruco.so
    /usr/local/lib/libopencv_quality.so
    /usr/local/lib/libopencv_reg.so.4.2
    /usr/local/lib/libopencv_ml.so.4.2.0
    /usr/local/lib/libopencv_videostab.so
    /usr/local/lib/libopencv_structured_light.so.4.2.0
    /usr/local/lib/libopencv_phase_unwrapping.so.4.2
    /usr/local/lib/libopencv_line_descriptor.so.4.2
    /usr/local/lib/libopencv_shape.so.4.2.0
    /usr/local/lib/libopencv_reg.so
    /usr/local/lib/libopencv_flann.so.4.2
    /usr/local/lib/libopencv_saliency.so.4.2
    /usr/local/lib/libopencv_shape.so
    /usr/local/lib/libopencv_video.so.4.2
    /usr/local/lib/libopencv_superres.so.4.2
    /usr/local/lib/libopencv_fuzzy.so
    /usr/local/lib/libopencv_dnn_objdetect.so.4.2
    /usr/local/lib/libopencv_line_descriptor.so
    /usr/local/lib/libopencv_text.so.4.2
    /usr/local/lib/libopencv_phase_unwrapping.so
    /usr/local/lib/libopencv_plot.so.4.2
    /usr/local/lib/libopencv_xphoto.so.4.2.0
    /usr/local/lib/libopencv_photo.so.4.2
    /usr/local/lib/libopencv_hfs.so.4.2
    /usr/local/lib/libopencv_ccalib.so
    /usr/local/lib/libopencv_features2d.so
    /usr/local/lib/libopencv_face.so.4.2
    /usr/local/lib/libopencv_calib3d.so
    /usr/local/lib/libopencv_hdf.so.4.2
    /usr/local/lib/libopencv_gapi.so.4.2
    /usr/local/lib/libopencv_ximgproc.so.4.2.0
    /usr/local/lib/libopencv_datasets.so.4.2.0
    /usr/local/lib/libopencv_dnn_superres.so.4.2.0
    /usr/local/lib/libopencv_superres.so
    /usr/local/lib/libopencv_ccalib.so.4.2
    /usr/local/lib/libopencv_imgcodecs.so.4.2
    /usr/local/lib/libopencv_video.so
    /usr/local/lib/libopencv_stereo.so.4.2
    /usr/local/lib/libopencv_superres.so.4.2.0
    /usr/local/lib/libopencv_shape.so.4.2
    /usr/local/lib/libopencv_datasets.so.4.2
    /usr/local/lib/libopencv_saliency.so
    /usr/local/lib/libopencv_video.so.4.2.0
    /usr/local/lib/libopencv_imgproc.so
    /usr/local/lib/libopencv_dnn.so
    /usr/local/lib/libopencv_imgproc.so.4.2
    /usr/local/lib/libopencv_aruco.so.4.2.0
    /usr/local/lib/libopencv_text.so
    /usr/local/lib/libopencv_stitching.so.4.2.0
    /usr/local/lib/libopencv_hfs.so.4.2.0
    /usr/local/lib/libopencv_gapi.so
    /usr/local/lib/libopencv_surface_matching.so.4.2.0
    /usr/local/lib/libopencv_dnn.so.4.2
    /usr/local/lib/libopencv_imgproc.so.4.2.0
    /usr/local/lib/libopencv_structured_light.so
    /usr/local/lib/libopencv_stereo.so.4.2.0
    /usr/local/lib/libopencv_freetype.so.4.2
    /usr/local/lib/libopencv_quality.so.4.2.0
    /usr/local/lib/libopencv_tracking.so.4.2
    /usr/local/lib/libopencv_datasets.so
    /usr/local/lib/libopencv_optflow.so.4.2.0
    /usr/local/lib/libopencv_core.so
    /usr/local/lib/libopencv_videoio.so
    /usr/local/lib/libopencv_bgsegm.so
    /usr/local/lib/libopencv_xphoto.so
    /usr/local/lib/libopencv_ximgproc.so.4.2
    /usr/local/lib/libopencv_rgbd.so
    /usr/local/lib/libopencv_surface_matching.so
    /usr/local/lib/libopencv_quality.so.4.2
    /usr/local/lib/libopencv_bgsegm.so.4.2
    /usr/local/lib/libopencv_stitching.so.4.2
    /usr/local/lib/libopencv_imgcodecs.so.4.2.0
    /usr/local/lib/libopencv_dnn.so.4.2.0
    /usr/local/lib/libopencv_gapi.so.4.2.0
    /usr/local/lib/libopencv_features2d.so.4.2
    /usr/local/lib/libopencv_xfeatures2d.so.4.2
    /usr/local/lib/libopencv_tracking.so
    /usr/local/lib/libopencv_stereo.so
    /usr/local/lib/libopencv_text.so.4.2.0
    /usr/local/lib/libopencv_fuzzy.so.4.2
    /usr/local/lib/libopencv_core.so.4.2
    /usr/local/lib/libopencv_objdetect.so.4.2.0
    /usr/local/lib/libopencv_ml.so.4.2
    /usr/local/lib/libopencv_plot.so.4.2.0
    /usr/local/lib/libopencv_img_hash.so.4.2
    /usr/local/lib/libopencv_objdetect.so.4.2
    /usr/local/lib/libopencv_saliency.so.4.2.0
    /usr/local/lib/libopencv_videostab.so.4.2.0
    /usr/local/lib/libopencv_ximgproc.so
    /usr/local/lib/libopencv_dnn_objdetect.so
    /usr/local/lib/libopencv_dpm.so.4.2.0
    /usr/local/lib/libopencv_img_hash.so.4.2.0
    /usr/local/lib/libopencv_viz.so
    /usr/local/lib/libopencv_xobjdetect.so.4.2
    /usr/local/lib/libopencv_objdetect.so
    /usr/local/lib/libopencv_imgcodecs.so
    /usr/local/lib/libopencv_bgsegm.so.4.2.0
    /usr/local/lib/libopencv_viz.so.4.2.0
    /usr/local/lib/libopencv_calib3d.so.4.2
    /usr/local/lib/libopencv_highgui.so.4.2.0
    /usr/local/lib/libopencv_xphoto.so.4.2
    /usr/local/lib/libopencv_ccalib.so.4.2.0
    /usr/local/lib/libopencv_dpm.so
    /usr/local/lib/libopencv_optflow.so.4.2
    /usr/local/lib/libopencv_freetype.so
    /usr/local/lib/libopencv_phase_unwrapping.so.4.2.0
    /usr/local/lib/libopencv_aruco.so.4.2
    /usr/local/lib/libopencv_dnn_superres.so.4.2
    /usr/local/lib/libopencv_core.so.4.2.0
    /usr/local/lib/libopencv_viz.so.4.2
    /usr/local/lib/libopencv_freetype.so.4.2.0
    /usr/local/lib/libopencv_img_hash.so
    /usr/local/lib/libopencv_dnn_objdetect.so.4.2.0
    /usr/local/lib/libopencv_line_descriptor.so.4.2.0
    /usr/local/lib/libopencv_xfeatures2d.so.4.2.0
    /usr/local/lib/libopencv_dnn_superres.so
    /usr/local/lib/libopencv_rgbd.so.4.2
    /usr/local/lib/libopencv_tracking.so.4.2.0
    /usr/local/lib/libopencv_optflow.so
    /usr/local/lib/libopencv_highgui.so
    /usr/local/lib/libopencv_reg.so.4.2.0
    /usr/local/lib/libopencv_stitching.so
    /usr/local/lib/libopencv_dpm.so.4.2
    /usr/local/lib/libopencv_features2d.so.4.2.0
    /usr/local/lib/libopencv_videostab.so.4.2
    /usr/local/lib/libopencv_hdf.so
    /usr/local/lib/libopencv_bioinspired.so.4.2
    /usr/local/lib/libopencv_photo.so.4.2.0
    /usr/local/lib/libopencv_highgui.so.4.2
    /usr/local/lib/libopencv_structured_light.so.4.2
    /usr/local/lib/libopencv_photo.so
    /usr/local/lib/libopencv_bioinspired.so.4.2.0
    /usr/local/lib/libopencv_rgbd.so.4.2.0
    /usr/local/lib/libopencv_videoio.so.4.2
    /usr/local/lib/libopencv_videoio.so.4.2.0
    /usr/share/lintian/overrides/libopencv-contrib3.2
    /usr/share/lintian/overrides/libopencv3.2-jni
    /usr/share/doc/libopencv-photo-dev
    /usr/share/doc/libopencv-photo-dev/README.Debian
    /usr/share/doc/libopencv-photo-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-photo-dev/copyright
    /usr/share/doc/libopencv-videostab-dev
    /usr/share/doc/libopencv-videostab-dev/README.Debian
    /usr/share/doc/libopencv-videostab-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-videostab-dev/copyright
    /usr/share/doc/libopencv-flann-dev
    /usr/share/doc/libopencv-flann-dev/README.Debian
    /usr/share/doc/libopencv-flann-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-flann-dev/copyright
    /usr/share/doc/libopencv-viz-dev
    /usr/share/doc/libopencv-viz-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-viz-dev/copyright
    /usr/share/doc/libopencv-calib3d3.2
    /usr/share/doc/libopencv-calib3d3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-calib3d3.2/copyright
    /usr/share/doc/libopencv-imgproc-dev
    /usr/share/doc/libopencv-imgproc-dev/README.Debian
    /usr/share/doc/libopencv-imgproc-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-imgproc-dev/copyright
    /usr/share/doc/libopencv-ml3.2
    /usr/share/doc/libopencv-ml3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-ml3.2/copyright
    /usr/share/doc/libopencv-flann3.2
    /usr/share/doc/libopencv-flann3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-flann3.2/copyright
    /usr/share/doc/libopencv-videoio3.2
    /usr/share/doc/libopencv-videoio3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-videoio3.2/copyright
    /usr/share/doc/libopencv-videostab3.2
    /usr/share/doc/libopencv-videostab3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-videostab3.2/copyright
    /usr/share/doc/libopencv-stitching3.2
    /usr/share/doc/libopencv-stitching3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-stitching3.2/copyright
    /usr/share/doc/libopencv-features2d-dev
    /usr/share/doc/libopencv-features2d-dev/README.Debian
    /usr/share/doc/libopencv-features2d-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-features2d-dev/copyright
    /usr/share/doc/libopencv-videoio-dev
    /usr/share/doc/libopencv-videoio-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-videoio-dev/copyright
    /usr/share/doc/libopencv-highgui3.2
    /usr/share/doc/libopencv-highgui3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-highgui3.2/copyright
    /usr/share/doc/libopencv-imgproc3.2
    /usr/share/doc/libopencv-imgproc3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-imgproc3.2/copyright
    /usr/share/doc/libopencv-core-dev
    /usr/share/doc/libopencv-core-dev/README.Debian
    /usr/share/doc/libopencv-core-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-core-dev/copyright
    /usr/share/doc/libopencv-photo3.2
    /usr/share/doc/libopencv-photo3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-photo3.2/copyright
    /usr/share/doc/libopencv-ml-dev
    /usr/share/doc/libopencv-ml-dev/README.Debian
    /usr/share/doc/libopencv-ml-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-ml-dev/copyright
    /usr/share/doc/libopencv-objdetect3.2
    /usr/share/doc/libopencv-objdetect3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-objdetect3.2/copyright
    /usr/share/doc/libopencv-superres-dev
    /usr/share/doc/libopencv-superres-dev/README.Debian
    /usr/share/doc/libopencv-superres-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-superres-dev/copyright
    /usr/share/doc/libopencv-core3.2
    /usr/share/doc/libopencv-core3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-core3.2/copyright
    /usr/share/doc/libopencv-imgcodecs-dev
    /usr/share/doc/libopencv-imgcodecs-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-imgcodecs-dev/copyright
    /usr/share/doc/libopencv-video-dev
    /usr/share/doc/libopencv-video-dev/README.Debian
    /usr/share/doc/libopencv-video-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-video-dev/copyright
    /usr/share/doc/libopencv-contrib3.2
    /usr/share/doc/libopencv-contrib3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-contrib3.2/copyright
    /usr/share/doc/libopencv-contrib-dev
    /usr/share/doc/libopencv-contrib-dev/README.Debian
    /usr/share/doc/libopencv-contrib-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-contrib-dev/copyright
    /usr/share/doc/libopencv-features2d3.2
    /usr/share/doc/libopencv-features2d3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-features2d3.2/copyright
    /usr/share/doc/libopencv3.2-java
    /usr/share/doc/libopencv3.2-java/changelog.Debian.gz
    /usr/share/doc/libopencv3.2-java/copyright
    /usr/share/doc/libopencv-viz3.2
    /usr/share/doc/libopencv-viz3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-viz3.2/copyright
    /usr/share/doc/libopencv-objdetect-dev
    /usr/share/doc/libopencv-objdetect-dev/README.Debian
    /usr/share/doc/libopencv-objdetect-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-objdetect-dev/copyright
    /usr/share/doc/libopencv-shape-dev
    /usr/share/doc/libopencv-shape-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-shape-dev/copyright
    /usr/share/doc/libopencv-stitching-dev
    /usr/share/doc/libopencv-stitching-dev/README.Debian
    /usr/share/doc/libopencv-stitching-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-stitching-dev/copyright
    /usr/share/doc/libopencv3.2-jni
    /usr/share/doc/libopencv3.2-jni/changelog.Debian.gz
    /usr/share/doc/libopencv3.2-jni/copyright
    /usr/share/doc/libopencv-dev
    /usr/share/doc/libopencv-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-dev/copyright
    /usr/share/doc/libopencv-superres3.2
    /usr/share/doc/libopencv-superres3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-superres3.2/copyright
    /usr/share/doc/libopencv-highgui-dev
    /usr/share/doc/libopencv-highgui-dev/README.Debian
    /usr/share/doc/libopencv-highgui-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-highgui-dev/copyright
    /usr/share/doc/libopencv-imgcodecs3.2
    /usr/share/doc/libopencv-imgcodecs3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-imgcodecs3.2/copyright
    /usr/share/doc/libopencv-video3.2
    /usr/share/doc/libopencv-video3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-video3.2/copyright
    /usr/share/doc/libopencv-calib3d-dev
    /usr/share/doc/libopencv-calib3d-dev/README.Debian
    /usr/share/doc/libopencv-calib3d-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-calib3d-dev/copyright
    /usr/share/doc/libopencv-shape3.2
    /usr/share/doc/libopencv-shape3.2/changelog.Debian.gz
    /usr/share/doc/libopencv-shape3.2/copyright
    /usr/share/doc/libopencv-ts-dev
    /usr/share/doc/libopencv-ts-dev/README.Debian
    /usr/share/doc/libopencv-ts-dev/changelog.Debian.gz
    /usr/share/doc/libopencv-ts-dev/copyright

    3. pkg-config opencv4 --libs --cflags 실행 시 다음과 같이 나옵니다. 문제 없는건가요?

    pkg-config opencv4 --libs --cflags
    -I/usr/local/include/opencv4/opencv -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_highgui -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_viz -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core

    4. 위에 질문한것들에 문제가 없다면, 4.2.0으로 출력되게 하려면 어떻게 해야하나요?

  18. thumbnail
    Favicon of https://everyone-is-first.tistory.com BlogIcon today_next

    안녕하세요, 컴파일 과정중에 Haewon Lee 님과 같이 Python2는 잡히지만 Python3는 경로가 잡히지 않은채로 컴파일이 되네요...저도 마찬가지로 빨간색 명령어를 다 기입해봤는데도 동일하네요. 답변으로는 conda를 재설치를 하라고 말씀하셨는데 혹시 왜 그런건지 알 수 있을까요? 감사합니다.

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.06.27 07:43 신고

      아나콘다를 사용하면 엉뚱하게 파이썬을 잡는 경우가 많습니다. 포스트에 나온것처럼 파이썬 경로를 수동으로 적어줘야 합니다

    • thumbnail
      Favicon of https://everyone-is-first.tistory.com BlogIcon today_next
      2021.06.27 15:02 신고

      답변 감사드립니다.!
      그래서 경로를 확인을 해본 결과 아래와 같습니다.ㅠㅠ

      포스트에 나온 것처럼(빨간색 표시)의 경로를 확인해본 결과로는 모두 파일이 포함되어있는 것으로 보입니다. 혹시, 그럼에도 불구하고 Python2에 대해서는 잘 나오지만, Python3에는 안나오는 이유가 있을까요..??

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.06.27 15:03 신고

      빨간표시처럼 옵션을 적어주면 잡힙니다

    • thumbnail
      Favicon of https://everyone-is-first.tistory.com BlogIcon today_next
      2021.06.27 16:06 신고

      같은 코드를 여러번 반복했는데도... 결과는 동일하게 python2 만 잡히네요.ㅠㅠ...
      conda 재설치를 해봐도 똑같을까요??

    • thumbnail
      Favicon of https://webnautes.tistory.com BlogIcon webnautes
      2021.06.27 16:08 신고

      이 설정이 일반 파이썬기준입니다. 아나콘다에서 사용하려면 옵션을 바꿔야 합니다.. 파이썬용을 사용하기 위해서라면 아나콘다에서 컴파일 없이 설치하는 방법을 찾아보세요

      일반 파이썬의 경우 다음처람 설치합니다
      pip3 install opencv-python

  19. thumbnail
    Favicon of https://hyebin-yoo.tistory.com BlogIcon gpqls

    build 디렉토리 내에서 cmake 명령어를 실행하면
    CMakeError : The wource directory "/home/hyebin/opencv/opencv_contrib-4.2.0" does not appear to contatin CMakeKists.txt
    라는 에러가 발생합니다
    다른 분들은 되는 것 같은데 왜 저만 안될까요..?

  20. thumbnail
    Favicon of https://hyebin-yoo.tistory.com BlogIcon gpqls

    대댓글이 안달려서ㅠ contrib에다가 제가 진행을 계속 하려고 했네요,,,ㅎ

  21. thumbnail
    Favicon of https://dodohan-horangii.tistory.com BlogIcon 도도한호랑이

    덕분에 잘 설치하고 가요. 대학원생이라 개발환경 구축하는데 참 어려움 많은데 도움 많이 받고 있네요 ㅎㅎ 감사합니다.