Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

AttributeError: 'module' object has no attribute 'face' OS X

I'm trying to build opencv with opencv_contrib on OS X. I will explain step-by-step what I did:

  1. I downloaded the OpenCV 3.1 from: http://opencv.org/downloads.html
  2. I also downloaded the opencv_contrib from: https://github.com/Itseez/opencv_contrib
  3. I put the opencv_contrib folder inside the opencv-3.1.0 folder
  4. I created a folder called "build" inside the opencv-3.1.0 folder
  5. From the terminal I went to the build folder: /Users/kelvinsp/Downloads/opencv-3.1.0/build/
  6. Then I ran the following commands:

    cmake -DOPENCV_EXTRA_MODULES_PATH=/Users/kelvinsp/Downloads/opencv-3.1.0/opencv_contrib/modules /Users/kelvinsp/Downloads/opencv-3.1.0/

    make -j5

    sudo make install

  7. Then, in the python terminal I tried to run the command: import cv2 and receive the following error: ImportError: No module named cv2

  8. Searching in stackoverflow, I found a solution and I ran the command: export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
  9. Now the import cv2 command is working, but when I ran the command help(cv2.face) I got the following error: AttributeError: 'module' object has no attribute 'face'

Can someone help me please? I don't know what I'm doing wrong.

AttributeError: 'module' object has no attribute 'face' OS X

I'm trying to build opencv with opencv_contrib on OS X. I will explain step-by-step what I did:

  1. I downloaded the OpenCV 3.1 from: http://opencv.org/downloads.html
  2. I also downloaded the opencv_contrib from: https://github.com/Itseez/opencv_contrib
  3. I put the opencv_contrib folder inside the opencv-3.1.0 folder
  4. I created a folder called "build" inside the opencv-3.1.0 folder
  5. From the terminal I went to the build folder: /Users/kelvinsp/Downloads/opencv-3.1.0/build/
  6. Then I ran the following commands:

    cmake -DOPENCV_EXTRA_MODULES_PATH=/Users/kelvinsp/Downloads/opencv-3.1.0/opencv_contrib/modules /Users/kelvinsp/Downloads/opencv-3.1.0/

    This is the cmake output: https://www.dropbox.com/s/wcywsoxdoof8las/output.txt?dl=0

    make -j5

    sudo make install

  7. Then, in the python terminal I tried to run the command: import cv2 and receive the following error: ImportError: No module named cv2

  8. Searching in stackoverflow, I found a solution and I ran the command: export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
  9. Now the import cv2 command is working, but when I ran the command help(cv2.face) I got the following error: AttributeError: 'module' object has no attribute 'face'

Can someone help me please? I don't know what I'm doing wrong.

AttributeError: 'module' object has no attribute 'face' OS X

I'm trying to build opencv with opencv_contrib on OS X. I will explain step-by-step what I did:

  1. I downloaded the OpenCV 3.1 from: http://opencv.org/downloads.html
  2. I also downloaded the opencv_contrib from: https://github.com/Itseez/opencv_contrib
  3. I put the opencv_contrib folder inside the opencv-3.1.0 folder
  4. I created a folder called "build" inside the opencv-3.1.0 folder
  5. From the terminal I went to the build folder: /Users/kelvinsp/Downloads/opencv-3.1.0/build/
  6. Then I ran the following commands:

    cmake -DOPENCV_EXTRA_MODULES_PATH=/Users/kelvinsp/Downloads/opencv-3.1.0/opencv_contrib/modules /Users/kelvinsp/Downloads/opencv-3.1.0/

    This is the cmake output: https://www.dropbox.com/s/wcywsoxdoof8las/output.txt?dl=0

    make -j5

    sudo make install

  7. Then, in the python terminal I tried to run the command: import cv2 and receive the following error: ImportError: No module named cv2

  8. Searching in stackoverflow, I found a solution and I ran the command: export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
  9. Now the import cv2 command is working, but when I ran the command help(cv2.face) I got the following error: AttributeError: 'module' object has no attribute 'face'

Can someone help me please? I don't know what I'm doing wrong.


cmake output:

-- The CXX compiler identification is AppleClang 7.3.0.7030031 -- The C compiler identification is AppleClang 7.3.0.7030031 -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Performing Test HAVE_CXX_FSIGNED_CHAR -- Performing Test HAVE_CXX_FSIGNED_CHAR - Success -- Performing Test HAVE_C_FSIGNED_CHAR -- Performing Test HAVE_C_FSIGNED_CHAR - Success -- Performing Test HAVE_CXX_W -- Performing Test HAVE_CXX_W - Success -- Performing Test HAVE_C_W -- Performing Test HAVE_C_W - Success -- Performing Test HAVE_CXX_WALL -- Performing Test HAVE_CXX_WALL - Failed -- Performing Test HAVE_C_WALL -- Performing Test HAVE_C_WALL - Failed -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success -- Performing Test HAVE_C_WERROR_RETURN_TYPE -- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_CXX_WERROR_ADDRESS -- Performing Test HAVE_CXX_WERROR_ADDRESS - Success -- Performing Test HAVE_C_WERROR_ADDRESS -- Performing Test HAVE_C_WERROR_ADDRESS - Success -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success -- Performing Test HAVE_CXX_WFORMAT -- Performing Test HAVE_CXX_WFORMAT - Success -- Performing Test HAVE_C_WFORMAT -- Performing Test HAVE_C_WFORMAT - Success -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success -- Performing Test HAVE_C_WMISSING_DECLARATIONS -- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Success -- Performing Test HAVE_C_WMISSING_PROTOTYPES -- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Success -- Performing Test HAVE_C_WSTRICT_PROTOTYPES -- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success -- Performing Test HAVE_CXX_WUNDEF -- Performing Test HAVE_CXX_WUNDEF - Success -- Performing Test HAVE_C_WUNDEF -- Performing Test HAVE_C_WUNDEF - Success -- Performing Test HAVE_CXX_WINIT_SELF -- Performing Test HAVE_CXX_WINIT_SELF - Success -- Performing Test HAVE_C_WINIT_SELF -- Performing Test HAVE_C_WINIT_SELF - Success -- Performing Test HAVE_CXX_WPOINTER_ARITH -- Performing Test HAVE_CXX_WPOINTER_ARITH - Success -- Performing Test HAVE_C_WPOINTER_ARITH -- Performing Test HAVE_C_WPOINTER_ARITH - Success -- Performing Test HAVE_CXX_WSHADOW -- Performing Test HAVE_CXX_WSHADOW - Success -- Performing Test HAVE_C_WSHADOW -- Performing Test HAVE_C_WSHADOW - Success -- Performing Test HAVE_CXX_WSIGN_PROMO -- Performing Test HAVE_CXX_WSIGN_PROMO - Success -- Performing Test HAVE_C_WSIGN_PROMO -- Performing Test HAVE_C_WSIGN_PROMO - Success -- Performing Test HAVE_CXX_WNO_NARROWING -- Performing Test HAVE_CXX_WNO_NARROWING - Success -- Performing Test HAVE_C_WNO_NARROWING -- Performing Test HAVE_C_WNO_NARROWING - Success -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success -- Performing Test HAVE_CXX_WNO_LONG_LONG -- Performing Test HAVE_CXX_WNO_LONG_LONG - Success -- Performing Test HAVE_C_WNO_LONG_LONG -- Performing Test HAVE_C_WNO_LONG_LONG - Success -- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS -- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS - Success -- Performing Test HAVE_C_QUNUSED_ARGUMENTS -- Performing Test HAVE_C_QUNUSED_ARGUMENTS - Success -- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY -- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success -- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY -- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success -- Performing Test HAVE_CXX_FNO_OMIT_FRAME_POINTER -- Performing Test HAVE_CXX_FNO_OMIT_FRAME_POINTER - Success -- Performing Test HAVE_C_FNO_OMIT_FRAME_POINTER -- Performing Test HAVE_C_FNO_OMIT_FRAME_POINTER - Success -- Performing Test HAVE_CXX_MSSE -- Performing Test HAVE_CXX_MSSE - Success -- Performing Test HAVE_C_MSSE -- Performing Test HAVE_C_MSSE - Success -- Performing Test HAVE_CXX_MSSE2 -- Performing Test HAVE_CXX_MSSE2 - Success -- Performing Test HAVE_C_MSSE2 -- Performing Test HAVE_C_MSSE2 - Success -- Performing Test HAVE_CXX_MNO_AVX -- Performing Test HAVE_CXX_MNO_AVX - Success -- Performing Test HAVE_C_MNO_AVX -- Performing Test HAVE_C_MNO_AVX - Success -- Performing Test HAVE_CXX_MSSE3 -- Performing Test HAVE_CXX_MSSE3 - Success -- Performing Test HAVE_C_MSSE3 -- Performing Test HAVE_C_MSSE3 - Success -- Performing Test HAVE_CXX_MNO_SSSE3 -- Performing Test HAVE_CXX_MNO_SSSE3 - Success -- Performing Test HAVE_C_MNO_SSSE3 -- Performing Test HAVE_C_MNO_SSSE3 - Success -- Performing Test HAVE_CXX_MNO_SSE4_1 -- Performing Test HAVE_CXX_MNO_SSE4_1 - Success -- Performing Test HAVE_C_MNO_SSE4_1 -- Performing Test HAVE_C_MNO_SSE4_1 - Success -- Performing Test HAVE_CXX_MNO_SSE4_2 -- Performing Test HAVE_CXX_MNO_SSE4_2 - Success -- Performing Test HAVE_C_MNO_SSE4_2 -- Performing Test HAVE_C_MNO_SSE4_2 - Success -- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN -- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success -- Performing Test HAVE_C_FVISIBILITY_HIDDEN -- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success -- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN -- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success -- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN -- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Success -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Looking for fseeko -- Looking for fseeko - found -- Looking for unistd.h -- Looking for unistd.h - found -- Check size of off64_t -- Check size of off64_t - failed -- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 -- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Success -- Performing Test HAVE_C_WNO_ATTRIBUTES -- Performing Test HAVE_C_WNO_ATTRIBUTES - Success -- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES -- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success -- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES -- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success -- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS -- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success -- Looking for assert.h -- Looking for assert.h - found -- Looking for fcntl.h -- Looking for fcntl.h - found -- Looking for io.h -- Looking for io.h - not found -- Looking for jbg_newlen -- Looking for jbg_newlen - not found -- Looking for mmap -- Looking for mmap - found -- Looking for search.h -- Looking for search.h - found -- Looking for string.h -- Looking for string.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Failed -- Performing Test HAVE_C_WNO_UNDEF -- Performing Test HAVE_C_WNO_UNDEF - Success -- Performing Test HAVE_C_WNO_UNUSED -- Performing Test HAVE_C_WNO_UNUSED - Success -- Performing Test HAVE_C_WNO_SIGN_COMPARE -- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success -- Performing Test HAVE_C_WNO_CAST_ALIGN -- Performing Test HAVE_C_WNO_CAST_ALIGN - Success -- Performing Test HAVE_C_WNO_SHADOW -- Performing Test HAVE_C_WNO_SHADOW - Success -- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED -- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Failed -- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST -- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success -- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST -- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success -- Performing Test HAVE_C_WNO_UNUSED_PARAMETER -- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success -- Performing Test HAVE_C_WNO_UNUSED_VARIABLE -- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success -- Performing Test HAVE_C_WNO_UNUSED_FUNCTION -- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success -- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION -- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success -- Performing Test HAVE_C_WNO_UNINITIALIZED -- Performing Test HAVE_C_WNO_UNINITIALIZED - Success -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Failed -- Performing Test HAVE_C_WNO_STRICT_OVERFLOW -- Performing Test HAVE_C_WNO_STRICT_OVERFLOW - Success -- Looking for semaphore.h -- Looking for semaphore.h - found -- Performing Test HAVE_CXX_WNO_SHADOW -- Performing Test HAVE_CXX_WNO_SHADOW - Success -- Performing Test HAVE_CXX_WNO_UNUSED -- Performing Test HAVE_CXX_WNO_UNUSED - Success -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success -- Performing Test HAVE_CXX_WNO_UNDEF -- Performing Test HAVE_CXX_WNO_UNDEF - Success -- Performing Test HAVE_CXX_WNO_UNINITIALIZED -- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success -- Performing Test HAVE_CXX_WNO_SWITCH -- Performing Test HAVE_CXX_WNO_SWITCH - Success -- Performing Test HAVE_CXX_WNO_PARENTHESES -- Performing Test HAVE_CXX_WNO_PARENTHESES - Success -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success -- Performing Test HAVE_CXX_WNO_EXTRA -- Performing Test HAVE_CXX_WNO_EXTRA - Success -- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS -- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success -- Checking for module 'gstreamer-base-1.0' -- No package 'gstreamer-base-1.0' found -- Checking for module 'gstreamer-video-1.0' -- No package 'gstreamer-video-1.0' found -- Checking for module 'gstreamer-app-1.0' -- No package 'gstreamer-app-1.0' found -- Checking for module 'gstreamer-riff-1.0' -- No package 'gstreamer-riff-1.0' found -- Checking for module 'gstreamer-pbutils-1.0' -- No package 'gstreamer-pbutils-1.0' found -- Checking for module 'gstreamer-base-0.10' -- No package 'gstreamer-base-0.10' found -- Checking for module 'gstreamer-video-0.10' -- No package 'gstreamer-video-0.10' found -- Checking for module 'gstreamer-app-0.10' -- No package 'gstreamer-app-0.10' found -- Checking for module 'gstreamer-riff-0.10' -- No package 'gstreamer-riff-0.10' found -- Checking for module 'gstreamer-pbutils-0.10' -- No package 'gstreamer-pbutils-0.10' found -- Checking for module 'libdc1394-2' -- No package 'libdc1394-2' found -- Checking for module 'libdc1394' -- No package 'libdc1394' found -- Checking for module 'libv4l1' -- No package 'libv4l1' found -- Checking for module 'libv4l2' -- No package 'libv4l2' found -- Looking for linux/videodev.h -- Looking for linux/videodev.h - not found -- Looking for linux/videodev2.h -- Looking for linux/videodev2.h - not found -- Looking for sys/videoio.h -- Looking for sys/videoio.h - not found -- Checking for module 'libavcodec' -- No package 'libavcodec' found -- Checking for module 'libavformat' -- No package 'libavformat' found -- Checking for module 'libavutil' -- No package 'libavutil' found -- Checking for module 'libswscale' -- No package 'libswscale' found -- Checking for module 'libavresample' -- No package 'libavresample' found -- Looking for libavformat/avformat.h -- Looking for libavformat/avformat.h - not found -- Looking for ffmpeg/avformat.h -- Looking for ffmpeg/avformat.h - not found -- Checking for module 'libgphoto2' -- No package 'libgphoto2' found -- ICV: Downloading ippicv_macosx_20151201.tgz... -- ICV: Unpacking ippicv_macosx_20151201.tgz to /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack... -- ICV: Package successfully downloaded -- found IPP (ICV version): 9.0.1 [9.0.1] -- at: /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx -- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.11") -- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake -- Found PythonInterp: /opt/local/bin/python2.7 (found suitable version "2.7.11", minimum required is "2.7") -- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "2.7.11" (found /usr/lib/libpython2.7.dylib) Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named numpy.distutils -- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.4" (found /usr/bin/python) -- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.2" (found /usr/bin/python) Unable to find any JVMs matching version "(null)". No Java runtime present, try --request to install. -- Found JNI: /System/Library/Frameworks/JavaVM.framework -- 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 -- Caffe: NO -- Protobuf: NO -- Glog: NO -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) -- Checking SFM deps... FALSE -- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags -- Assume that non-module dependency is available: -framework OpenCL (for module opencv_core) -- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED -- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED - Failed -- Performing Test HAVE_CXX_WNO_SIGN_PROMO -- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Success -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Could NOT find Protobuf (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR) -- Build libprotobuf from sources: -- libprotobuf not found into system -- The protocol buffer compiler not found -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for C++ include unordered_map -- Looking for C++ include unordered_map - found -- Looking for C++ include tr1/unordered_map -- Looking for C++ include tr1/unordered_map - not found -- Looking for C++ include unordered_set -- Looking for C++ include unordered_set - found -- Looking for C++ include tr1/unordered_set -- Looking for C++ include tr1/unordered_set - not found -- Performing Test HAVE_CXX_WNO_DEPRECATED -- Performing Test HAVE_CXX_WNO_DEPRECATED - Success -- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS -- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success -- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE -- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Success -- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS -- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS - Success

-- Tesseract: NO

-- General configuration for OpenCV 3.1.0 =====================================

-- Version control: unknown

-- Platform: -- Host: Darwin 15.5.0 x86_64 -- CMake: 3.5.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make

-- Configuration: Release

-- C/C++: -- Built as dynamic libs?: YES -- C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (ver 7.3.0.7030031) -- C++ flags (Release): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- C flags (Release): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release): -- Linker flags (Debug): -- Precompiled headers: NO -- Extra dependencies: -framework OpenCL -framework Cocoa -framework QTKit -framework QuartzCore -framework AppKit

-- 3rdparty dependencies: libjpeg libwebp libpng libtiff libjasper IlmImf zlib libprotobuf

-- OpenCV modules: -- To be built: core flann imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching -- Disabled: world contrib_world -- Disabled by dependency: -

-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv hdf matlab sfm

-- GUI: -- QT: NO -- Cocoa: YES -- OpenGL support: NO

-- VTK support: NO

-- Media I/O: -- ZLib: build (ver 1.2.8) -- JPEG: build (ver 90) -- WEBP: build (ver 0.3.1) -- PNG: build (ver 1.6.19) -- TIFF: build (ver 42 - 4.0.2) -- JPEG 2000: build (ver 1.900.1) -- OpenEXR: build (ver 1.7.1)

-- GDAL: NO

-- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: NO -- FFMPEG: NO -- codec: NO -- format: NO -- util: NO -- swscale: NO -- resample: NO -- gentoo-style: NO -- GStreamer: NO -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- OpenNI2: NO -- PvAPI: NO -- GigEVisionSDK: NO -- QuickTime: NO -- QTKit: YES -- V4L/V4L2: NO/NO -- XIMEA: NO

-- gPhoto2: NO

-- Parallel framework: GCD

-- Other third-party libraries: -- Use IPP: 9.0.1 [9.0.1] -- at: /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx -- Use IPP Async: NO -- Use VA: NO -- Use Intel VA-API/OpenCL: NO -- Use Eigen: NO -- Use Cuda: NO -- Use OpenCL: YES

-- Use custom HAL: NO

-- OpenCL: -- Version: static -- libraries: -framework OpenCL -- Use AMDFFT: NO

-- Use AMDBLAS: NO

-- Python 2:

-- Interpreter: /opt/local/bin/python2.7 (ver 2.7.11)

-- Python 3:

-- Interpreter: NO

-- Python (for build): /opt/local/bin/python2.7

-- Java: -- ant: NO -- JNI: /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers -- Java wrappers: NO

-- Java tests: NO

-- Matlab: Matlab not found or implicitly disabled

-- Documentation: -- Doxygen: /usr/local/bin/doxygen (ver 1.8.11)

-- PlantUML: NO

-- Tests and samples: -- Tests: YES -- Performance tests: YES

-- C/C++ Examples: NO

-- Install path: /usr/local

-- cvconfig.h is in: /Users/kelvinsp/Downloads/opencv-3.1.0/build

-- -----------------------------------------------------------------

-- Configuring done -- Generating done -- Build files have been written to: /Users/kelvinsp/Downloads/opencv-3.1.0/build

click to hide/show revision 4
No.4 Revision

updated 2016-06-01 11:29:49 -0600

berak gravatar image

AttributeError: 'module' object has no attribute 'face' OS X

I'm trying to build opencv with opencv_contrib on OS X. I will explain step-by-step what I did:

  1. I downloaded the OpenCV 3.1 from: http://opencv.org/downloads.html
  2. I also downloaded the opencv_contrib from: https://github.com/Itseez/opencv_contrib
  3. I put the opencv_contrib folder inside the opencv-3.1.0 folder
  4. I created a folder called "build" inside the opencv-3.1.0 folder
  5. From the terminal I went to the build folder: /Users/kelvinsp/Downloads/opencv-3.1.0/build/
  6. Then I ran the following commands:

    cmake -DOPENCV_EXTRA_MODULES_PATH=/Users/kelvinsp/Downloads/opencv-3.1.0/opencv_contrib/modules /Users/kelvinsp/Downloads/opencv-3.1.0/

    make -j5

    sudo make install

  7. Then, in the python terminal I tried to run the command: import cv2 and receive the following error: ImportError: No module named cv2

  8. Searching in stackoverflow, I found a solution and I ran the command: export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
  9. Now the import cv2 command is working, but when I ran the command help(cv2.face) I got the following error: AttributeError: 'module' object has no attribute 'face'

Can someone help me please? I don't know what I'm doing wrong.


cmake output:

-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- The C compiler identification is AppleClang 7.3.0.7030031
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Failed
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Failed
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY
-- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success
-- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY
-- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success
-- Performing Test HAVE_CXX_FNO_OMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FNO_OMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FNO_OMIT_FRAME_POINTER
-- Performing Test HAVE_C_FNO_OMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MNO_AVX
-- Performing Test HAVE_CXX_MNO_AVX - Success
-- Performing Test HAVE_C_MNO_AVX
-- Performing Test HAVE_C_MNO_AVX - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_MNO_SSSE3
-- Performing Test HAVE_CXX_MNO_SSSE3 - Success
-- Performing Test HAVE_C_MNO_SSSE3
-- Performing Test HAVE_C_MNO_SSSE3 - Success
-- Performing Test HAVE_CXX_MNO_SSE4_1
-- Performing Test HAVE_CXX_MNO_SSE4_1 - Success
-- Performing Test HAVE_C_MNO_SSE4_1
-- Performing Test HAVE_C_MNO_SSE4_1 - Success
-- Performing Test HAVE_CXX_MNO_SSE4_2
-- Performing Test HAVE_CXX_MNO_SSE4_2 - Success
-- Performing Test HAVE_C_MNO_SSE4_2
-- Performing Test HAVE_C_MNO_SSE4_2 - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_C_WNO_ATTRIBUTES
-- Performing Test HAVE_C_WNO_ATTRIBUTES - Success
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for jbg_newlen
-- Looking for jbg_newlen - not found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for search.h
-- Looking for search.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Failed
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_UNUSED
-- Performing Test HAVE_C_WNO_UNUSED - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_C_WNO_CAST_ALIGN
-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION
-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success
-- Performing Test HAVE_C_WNO_UNINITIALIZED
-- Performing Test HAVE_C_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Failed
-- Performing Test HAVE_C_WNO_STRICT_OVERFLOW
-- Performing Test HAVE_C_WNO_STRICT_OVERFLOW - Success
-- Looking for semaphore.h
-- Looking for semaphore.h - found
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_UNUSED
-- Performing Test HAVE_CXX_WNO_UNUSED - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_SWITCH
-- Performing Test HAVE_CXX_WNO_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_PARENTHESES
-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
--   No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
--   No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
--   No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
--   No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
--   No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
--   No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
--   No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
--   No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
--   No package 'gstreamer-pbutils-0.10' found
-- Checking for module 'libdc1394-2'
--   No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
--   No package 'libdc1394' found
-- Checking for module 'libv4l1'
--   No package 'libv4l1' found
-- Checking for module 'libv4l2'
--   No package 'libv4l2' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libavcodec'
--   No package 'libavcodec' found
-- Checking for module 'libavformat'
--   No package 'libavformat' found
-- Checking for module 'libavutil'
--   No package 'libavutil' found
-- Checking for module 'libswscale'
--   No package 'libswscale' found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- ICV: Downloading ippicv_macosx_20151201.tgz...
-- ICV: Unpacking ippicv_macosx_20151201.tgz to /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.11")
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
-- Found PythonInterp: /opt/local/bin/python2.7 (found suitable version "2.7.11", minimum required is "2.7")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is exact version "2.7.11" (found /usr/lib/libpython2.7.dylib)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy.distutils
-- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.4" (found /usr/bin/python)
-- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3.2" (found /usr/bin/python)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
-- Found JNI: /System/Library/Frameworks/JavaVM.framework
-- 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
-- Caffe:   NO
-- Protobuf:   NO
-- Glog:   NO
-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
-- Checking SFM deps... FALSE
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Assume that non-module dependency is available: -framework OpenCL (for module opencv_core)
-- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Could NOT find Protobuf (missing:  PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)
-- Build libprotobuf from sources:
--     libprotobuf not found into system
--     The protocol buffer compiler not found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - not found
-- Looking for C++ include unordered_set
-- Looking for C++ include unordered_set - found
-- Looking for C++ include tr1/unordered_set
-- Looking for C++ include tr1/unordered_set - not found
-- Performing Test HAVE_CXX_WNO_DEPRECATED
-- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Success
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS - Success

Success -- Tesseract: NO

NO -- -- General configuration for OpenCV 3.1.0 =====================================

===================================== -- Version control: unknown

unknown -- -- Platform: -- Host: Darwin 15.5.0 x86_64 -- CMake: 3.5.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make

/usr/bin/make -- Configuration: Release

Release -- -- C/C++: -- Built as dynamic libs?: YES -- C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (ver 7.3.0.7030031) -- C++ flags (Release): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- C flags (Release): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -fsigned-char -W -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release): -- Linker flags (Debug): -- Precompiled headers: NO -- Extra dependencies: -framework OpenCL -framework Cocoa -framework QTKit -framework QuartzCore -framework AppKit

AppKit -- 3rdparty dependencies: libjpeg libwebp libpng libtiff libjasper IlmImf zlib libprotobuf

libprotobuf -- -- OpenCV modules: -- To be built: core flann imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching -- Disabled: world contrib_world -- Disabled by dependency: -

- -- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv hdf matlab sfm

sfm -- -- GUI: -- QT: NO -- Cocoa: YES -- OpenGL support: NO

NO -- VTK support: NO

NO -- -- Media I/O: -- ZLib: build (ver 1.2.8) -- JPEG: build (ver 90) -- WEBP: build (ver 0.3.1) -- PNG: build (ver 1.6.19) -- TIFF: build (ver 42 - 4.0.2) -- JPEG 2000: build (ver 1.900.1) -- OpenEXR: build (ver 1.7.1)

1.7.1) -- GDAL: NO

NO -- -- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: NO -- FFMPEG: NO -- codec: NO -- format: NO -- util: NO -- swscale: NO -- resample: NO -- gentoo-style: NO -- GStreamer: NO -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- OpenNI2: NO -- PvAPI: NO -- GigEVisionSDK: NO -- QuickTime: NO -- QTKit: YES -- V4L/V4L2: NO/NO -- XIMEA: NO

NO -- gPhoto2: NO

NO -- -- Parallel framework: GCD

GCD -- -- Other third-party libraries: -- Use IPP: 9.0.1 [9.0.1] -- at: /Users/kelvinsp/Downloads/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_osx -- Use IPP Async: NO -- Use VA: NO -- Use Intel VA-API/OpenCL: NO -- Use Eigen: NO -- Use Cuda: NO -- Use OpenCL: YES

YES -- Use custom HAL: NO

NO -- -- OpenCL: -- Version: static -- libraries: -framework OpenCL -- Use AMDFFT: NO

NO -- Use AMDBLAS: NO

NO -- -- Python 2:

2: -- Interpreter: /opt/local/bin/python2.7 (ver 2.7.11)

2.7.11) -- -- Python 3:

3: -- Interpreter: NO

NO -- -- Python (for build): /opt/local/bin/python2.7

/opt/local/bin/python2.7 -- -- Java: -- ant: NO -- JNI: /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers -- Java wrappers: NO

NO -- Java tests: NO

NO -- -- Matlab: Matlab not found or implicitly disabled

disabled -- -- Documentation: -- Doxygen: /usr/local/bin/doxygen (ver 1.8.11)

1.8.11) -- PlantUML: NO

NO -- -- Tests and samples: -- Tests: YES -- Performance tests: YES

YES -- C/C++ Examples: NO

NO -- -- Install path: /usr/local

/usr/local -- -- cvconfig.h is in: /Users/kelvinsp/Downloads/opencv-3.1.0/build

-- -----------------------------------------------------------------

/Users/kelvinsp/Downloads/opencv-3.1.0/build -- ----------------------------------------------------------------- -- -- Configuring done -- Generating done -- Build files have been written to: /Users/kelvinsp/Downloads/opencv-3.1.0/build

/Users/kelvinsp/Downloads/opencv-3.1.0/build