-
-
Save senkumartup/a6d6af691dcd9e493917efc9310a9c64 to your computer and use it in GitHub Desktop.
| cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
| -D CMAKE_INSTALL_PREFIX=/usr/local \ | |
| -D INSTALL_C_EXAMPLES=ON \ | |
| -D INSTALL_PYTHON_EXAMPLES=ON \ | |
| -D WITH_TBB=ON \ | |
| -D WITH_V4L=ON \ | |
| -D WITH_QT=ON \ | |
| -D WITH_OPENGL=ON \ | |
| -D OPENCV_EXTRA_MODULES_PATH=/home/dcml/workspace/opencv_build/opencv_contrib-3.4.1/modules \ | |
| -D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
| -D BUILD_PYTHON_SUPPORT=ON \ | |
| -D BUILD_opencv_python2=ON \ | |
| -D BUILD_opencv_python3=ON \ | |
| -D PYTHON_EXECUTABLE='/opt/anaconda2/bin/python' \ | |
| -D PYTHON2_EXECUTABLE='/opt/anaconda2/bin/python' \ | |
| -D BUILD_EXAMPLES=ON .. |
dcml@dcml-MS-7B61:~/workspace/opencv_build/opencv-3.4.1/build$ sudo make install[sudo] password for dcml:
-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Checking for module 'libdc1394-2'
-- No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
-- No package 'libdc1394' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libgphoto2'
-- No package 'libgphoto2' found
-- found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
-- at: /home/dcml/workspace/opencv_build/opencv-3.4.1/build/3rdparty/ippicv/ippicv_lnx
-- found Intel IPP IW sources: 2017.0.3
-- at: /home/dcml/workspace/opencv_build/opencv-3.4.1/build/3rdparty/ippicv/ippiw_lnx
-- CUDA detected: 9.0
-- CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-D_FORCE_INLINES
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR)
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- Could NOT find Pylint (missing: PYLINT_EXECUTABLE)
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Module opencv_ovis disabled because OGRE3D was not found
-- freetype2: YES
-- harfbuzz: YES
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Looking for tiny_dnn.h
-- Looking for tiny_dnn.h - found
-- Found tiny-dnn in: /home/dcml/workspace/opencv_build/opencv-3.4.1/build/3rdparty/tinydnn/tiny-dnn-1.0.0a3
-- The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='')
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
-- freetype2: YES
-- harfbuzz: YES
-- Tesseract: YES
-- DNN_FACE_DETECTOR: Download: res10_300x300_ssd_iter_140000.caffemodel
-- OpenCL samples are skipped: OpenCL SDK is required
--
-- General configuration for OpenCV 3.4.1 =====================================
-- Version control: unknown
--
-- Extra modules:
-- Location (extra): /home/dcml/workspace/opencv_build/opencv_contrib-3.4.1/modules
-- Version control (extra): unknown
--
-- Platform:
-- Timestamp: 2018-05-11T15:02:24Z
-- Host: Linux 4.8.0-36-generic x86_64
-- CMake: 3.5.1
-- 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 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- AVX512_SKX (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 5.4.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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -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-narrowing -Wno-comment -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-narrowing -Wno-comment -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):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: dl m pthread rt cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib64
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dpm face features2d flann freetype fuzzy hdf hfs highgui img_hash imgcodecs imgproc java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
-- Disabled: js world
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj cvv dnn_modern java matlab ovis python3 sfm viz
-- Applications: tests perf_tests examples apps
-- Documentation: NO
-- Non-free algorithms: NO
--
-- GUI:
-- GTK+: YES (ver 3.18.9)
-- GThread : YES (ver 2.48.2)
-- GtkGlExt: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
-- WEBP: build (ver encoder: 0x020e)
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
--
-- Video I/O:
-- DC1394: NO
-- FFMPEG: YES
-- avcodec: YES (ver 56.60.100)
-- avformat: YES (ver 56.40.101)
-- avutil: YES (ver 54.31.100)
-- swscale: YES (ver 3.1.101)
-- avresample: YES (ver 2.1.0)
-- GStreamer:
-- base: YES (ver 1.8.3)
-- video: YES (ver 1.8.3)
-- app: YES (ver 1.8.3)
-- riff: YES (ver 1.8.3)
-- pbutils: YES (ver 1.8.3)
-- libv4l/libv4l2: NO
-- v4l/v4l2: linux/videodev2.h
-- gPhoto2: NO
--
-- Parallel framework: pthreads
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Intel IPP: 2017.0.3 [2017.0.3]
-- at: /home/dcml/workspace/opencv_build/opencv-3.4.1/build/3rdparty/ippicv/ippicv_lnx
-- Intel IPP IW: sources (2017.0.3)
-- at: /home/dcml/workspace/opencv_build/opencv-3.4.1/build/3rdparty/ippicv/ippiw_lnx
-- Lapack: NO
-- Eigen: NO
-- Custom HAL: NO
-- Protobuf: build (3.5.1)
--
-- NVIDIA CUDA: YES (ver 9.0, CUFFT CUBLAS)
-- NVIDIA GPU arch: 30 35 37 50 52 60 61 70
-- NVIDIA PTX archs:
--
-- OpenCL: YES (no extra features)
-- Include path: /home/dcml/workspace/opencv_build/opencv-3.4.1/3rdparty/include/opencl/1.2
-- Link libraries: Dynamic load
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.12)
-- Libraries: /usr/lib/python2.7 (ver 2.7.12)
-- numpy: /home/dcml/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.14.3)
-- packages path: lib/python2.7/dist-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab: NO
--
-- Install to: /usr/local
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dcml/workspace/opencv_build/opencv-3.4.1/build
CV2 Python Package Install
dcml@dcml-MS-7B61:~/workspace/opencv_build/opencv-3.4.1/build$ find . -name *.so | grep cv2 ``./lib/cv2.so
dcml@dcml-MS-7B61:~/workspace/opencv_build/opencv-3.4.1/build$ sudo cp lib/cv2.so /opt/anaconda2/lib/python2.7/site-packages/
dcml@dcml-MS-7B61:~/workspace/opencv_build/opencv-3.4.1/build$ /opt/anaconda2/bin/python
Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import cv2
cv2.version
'3.4.1'
quit()
Tesser Act - install
sudo apt install tesseract-ocr
sudo /opt/anaconda2/bin/conda install -c auto pytesseract
sudo /opt/anaconda2/bin/conda install pillow
Also see
https://github.com/anish9208/opencv-car-number-plate-detection-/blob/master/question14.py
https://github.com/MaddyThakker/Speed-Breaker/tree/master/Vehicle
https://github.com/Aqsa-K/Number-Plate-Detection-and-Separation-OpenCV
Packages
libtbb-dev
libv4l/libv4l2-dev
libgstreamer-plugins-base1.0-dev
tesseract-ocr
libtesseract-dev
libleptonica-dev