<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV &amp; OpenCV-contrib =&gt; 3.4.3</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04 LTS, 64 bit</li>
<li>Compiler =&gt; gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0</li>
<li>Python version =&gt; Python 2.7.15 :: Anaconda, Inc.</li>
<li>CUDA version =&gt; NVCC 9.0, cuDNN 7.2.1</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">After I install OpenCV with OpenCV-contrib from source, I got the following error when I try to import OpenCV:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/19413803/45933104-c51d7400-bf54-11e8-8351-38a4c7359d2a.png"><img src="https://user-images.githubusercontent.com/19413803/45933104-c51d7400-bf54-11e8-8351-38a4c7359d2a.png" alt="image" style="max-width: 100%;"></a><br>
I just finish the compilation without error using:<br>
<code class="notranslate">cmake -D CMAKE_BUILD_TYPE=RELEASE \  -D CMAKE_INSTALL_PREFIX=/usr/local \  -D INSTALL_PYTHON_EXAMPLES=ON \  -D INSTALL_C_EXAMPLES=ON \  -D WITH_CUDA=OFF \  -D ENABLE_FAST_MATH=1 \  -D CUDA_FAST_MATH=1 \  -D WITH_CUBLAS=1 \  -D BUILD_EXAMPLES=ON \  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.3/modules ..  </code><br>
I first tried with CUDA, but because of errors in connection with the version of gcc (NVCC needs version &lt;5, but OpenCV needs version&gt; 7 because of the error "-Wimplicit-fallthrough = 3 "unrecognized at 2% compilation). I finally did the compilation without CUDA and I had no compilation error.</p>
<p dir="auto">I find that other people who have errors like this have had it with Mathematica or Draftsight (for example). <strong>However, I do not know how to fix this in the case of OpenCV.</strong></p>
<p dir="auto">Note that I successfully compiled OpenCV (without CUDA and OpenCV_contrib) yesterday with the same compilation options.</p>
<p dir="auto">For information, that was the information I get from cmake before compiling. We can see than "freetype2" was correctly identified (even if it seem that it could be the cause of the problem according to some forum of similar trouble on Mathematica)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
&gt; cmake -D CMAKE_BUILD_TYPE=RELEASE \  -D CMAKE_INSTALL_PREFIX=/usr/local \  -D INSTALL_PYTHON_EXAMPLES=ON \  -D INSTALL_C_EXAMPLES=ON \  -D WITH_CUDA=OFF \  -D ENABLE_FAST_MATH=1 \  -D CUDA_FAST_MATH=1 \  -D WITH_CUBLAS=1 \  -D BUILD_EXAMPLES=ON \  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.3/modules .. 
&gt; -- Looking for ccache - not found
&gt; -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version &quot;1.2.11&quot;, minimum required is &quot;1.2.3&quot;) 
&gt; -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version &quot;1.2.11&quot;) 
&gt; -- Looking for linux/videodev.h
&gt; -- Looking for linux/videodev.h - not found
&gt; -- Looking for linux/videodev2.h
&gt; -- Looking for linux/videodev2.h - found
&gt; -- Looking for sys/videoio.h
&gt; -- Looking for sys/videoio.h - not found
&gt; -- Checking for module 'libavresample'
&gt; --   No package 'libavresample' found
&gt; -- found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
&gt; -- at: /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippicv_lnx
&gt; -- found Intel IPP IW sources: 2017.0.3
&gt; -- at: /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippiw_lnx
&gt; -- LAPACK(Atlas): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libcblas.so;/usr/lib/x86_64-linux-gnu/libatlas.so
&gt; -- LAPACK(Atlas): Support is enabled.
&gt; -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
&gt; -- The imported target &quot;vtkRenderingPythonTkWidgets&quot; references the file
&gt;    &quot;/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so&quot;
&gt; but this file does not exist.  Possible reasons include:
&gt; * The file was deleted, renamed, or moved to another location.
&gt; * An install or uninstall procedure did not complete successfully.
&gt; * The installation package was faulty and contained
&gt;    &quot;/usr/lib/cmake/vtk-7.1/VTKTargets.cmake&quot;
&gt; but not all the files it references.
&gt; 
&gt; -- The imported target &quot;vtk&quot; references the file
&gt;    &quot;/usr/bin/vtk&quot;
&gt; but this file does not exist.  Possible reasons include:
&gt; * The file was deleted, renamed, or moved to another location.
&gt; * An install or uninstall procedure did not complete successfully.
&gt; * The installation package was faulty and contained
&gt;    &quot;/usr/lib/cmake/vtk-7.1/VTKTargets.cmake&quot;
&gt; but not all the files it references.
&gt; 
&gt; -- Found VTK 7.1.1 (/usr/lib/cmake/vtk-7.1/UseVTK.cmake)
&gt; -- Caffe:   NO
&gt; -- Protobuf:   NO
&gt; -- Glog:   NO
&gt; -- freetype2:   YES
&gt; -- harfbuzz:    YES
&gt; -- HDF5: Using hdf5 compiler wrapper to determine C configuration
&gt; -- Module opencv_ovis disabled because OGRE3D was not found
&gt; -- 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.
&gt; -- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
&gt; -- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
&gt; -- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
&gt; -- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
&gt; -- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
&gt; -- HDF5: Using hdf5 compiler wrapper to determine C configuration
&gt; -- freetype2:   YES
&gt; -- harfbuzz:    YES
&gt; -- Checking for modules 'tesseract;lept'
&gt; --   No package 'tesseract' found
&gt; --   No package 'lept' found
&gt; -- Tesseract:   NO
&gt; -- OpenCL samples are skipped: OpenCL SDK is required
&gt; -- 
&gt; -- General configuration for OpenCV 3.4.3 =====================================
&gt; --   Version control:               unknown
&gt; -- 
&gt; --   Extra modules:
&gt; --     Location (extra):            /home/vincent/opencv_contrib-3.4.3/modules
&gt; --     Version control (extra):     unknown
&gt; -- 
&gt; --   Platform:
&gt; --     Timestamp:                   2018-09-22T22:13:51Z
&gt; --     Host:                        Linux 4.15.0-34-generic x86_64
&gt; --     CMake:                       3.10.2
&gt; --     CMake generator:             Unix Makefiles
&gt; --     CMake build tool:            /usr/bin/make
&gt; --     Configuration:               RELEASE
&gt; -- 
&gt; --   CPU/HW features:
&gt; --     Baseline:                    SSE SSE2 SSE3
&gt; --       requested:                 SSE3
&gt; --     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
&gt; --       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
&gt; --       SSE4_1 (5 files):          + SSSE3 SSE4_1
&gt; --       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
&gt; --       FP16 (2 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
&gt; --       AVX (6 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
&gt; --       AVX2 (11 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
&gt; --       AVX512_SKX (1 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
&gt; -- 
&gt; --   C/C++:
&gt; --     Built as dynamic libs?:      YES
&gt; --     C++11:                       YES
&gt; --     C++ Compiler:                /usr/bin/c++  (ver 7.3.0)
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
&gt; --     C Compiler:                  /usr/bin/cc
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
&gt; --     Linker flags (Release):      
&gt; --     Linker flags (Debug):        
&gt; --     ccache:                      NO
&gt; --     Precompiled headers:         YES
&gt; --     Extra dependencies:          dl m pthread rt
&gt; --     3rdparty dependencies:
&gt; -- 
&gt; --   OpenCV modules:
&gt; --     To be built:                 aruco bgsegm bioinspired calib3d ccalib core 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 viz xfeatures2d ximgproc xobjdetect xphoto
&gt; --     Disabled:                    js matlab world
&gt; --     Disabled by dependency:      -
&gt; --     Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv java ovis python3 sfm
&gt; --     Applications:                tests perf_tests examples apps
&gt; --     Documentation:               NO
&gt; --     Non-free algorithms:         YES
&gt; -- 
&gt; --   GUI: 
&gt; --     GTK+:                        YES (ver 3.22.30)
&gt; --       GThread :                  YES (ver 2.56.2)
&gt; --       GtkGlExt:                  NO
&gt; --     VTK support:                 YES (ver 7.1.1)
&gt; -- 
&gt; --   Media I/O: 
&gt; --     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
&gt; --     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
&gt; --     WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020e)
&gt; --     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
&gt; --     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
&gt; --     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
&gt; --     OpenEXR:                     build (ver 1.7.1)
&gt; --     HDR:                         YES
&gt; --     SUNRASTER:                   YES
&gt; --     PXM:                         YES
&gt; -- 
&gt; --   Video I/O:
&gt; --     DC1394:                      YES (ver 2.2.5)
&gt; --     FFMPEG:                      YES
&gt; --       avcodec:                   YES (ver 57.107.100)
&gt; --       avformat:                  YES (ver 57.83.100)
&gt; --       avutil:                    YES (ver 55.78.100)
&gt; --       swscale:                   YES (ver 4.8.100)
&gt; --       avresample:                NO
&gt; --     GStreamer:                   
&gt; --       base:                      YES (ver 1.14.1)
&gt; --       video:                     YES (ver 1.14.1)
&gt; --       app:                       YES (ver 1.14.1)
&gt; --       riff:                      YES (ver 1.14.1)
&gt; --       pbutils:                   YES (ver 1.14.1)
&gt; --     libv4l/libv4l2:              NO
&gt; --     v4l/v4l2:                    linux/videodev2.h
&gt; -- 
&gt; --   Parallel framework:            pthreads
&gt; -- 
&gt; --   Trace:                         YES (with Intel ITT)
&gt; -- 
&gt; --   Other third-party libraries:
&gt; --     Intel IPP:                   2017.0.3 [2017.0.3]
&gt; --            at:                   /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippicv_lnx
&gt; --     Intel IPP IW:                sources (2017.0.3)
&gt; --               at:                /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippiw_lnx
&gt; --     Lapack:                      YES (/usr/lib/x86_64-linux-gnu/liblapack.so /usr/lib/x86_64-linux-gnu/libcblas.so /usr/lib/x86_64-linux-gnu/libatlas.so)
&gt; --     Eigen:                       YES (ver 3.3.4)
&gt; --     Custom HAL:                  NO
&gt; --     Protobuf:                    build (3.5.1)
&gt; -- 
&gt; --   OpenCL:                        YES (no extra features)
&gt; --     Include path:                /home/vincent/opencv-3.4.3/3rdparty/include/opencl/1.2
&gt; --     Link libraries:              Dynamic load
&gt; -- 
&gt; --   Python 2:
&gt; --     Interpreter:                 /home/vincent/miniconda2/bin/python2.7 (ver 2.7.15)
&gt; --     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.15rc1)
&gt; --     numpy:                       /home/vincent/miniconda2/lib/python2.7/site-packages/numpy/core/include (ver 1.15.1)
&gt; --     packages path:               lib/python2.7/site-packages
&gt; -- 
&gt; --   Python (for build):            /home/vincent/miniconda2/bin/python2.7
&gt; -- 
&gt; --   Java:                          
&gt; --     ant:                         NO
&gt; --     JNI:                         NO
&gt; --     Java wrappers:               NO
&gt; --     Java tests:                  NO
&gt; -- 
&gt; --   Matlab:                        YES
&gt; --     mex:                         /usr/local/MATLAB/R2018b/bin/mex
&gt; --     Compiler/generator:          Not working (bindings will not be generated)
&gt; -- 
&gt; --   Install to:                    /usr/local
&gt; -- -----------------------------------------------------------------
&gt; -- 
&gt; -- Configuring done
&gt; -- Generating done
&gt; -- Build files have been written to: /home/vincent/opencv-3.4.3/build
&gt; 
"><pre class="notranslate"><code class="notranslate">
&gt; cmake -D CMAKE_BUILD_TYPE=RELEASE \  -D CMAKE_INSTALL_PREFIX=/usr/local \  -D INSTALL_PYTHON_EXAMPLES=ON \  -D INSTALL_C_EXAMPLES=ON \  -D WITH_CUDA=OFF \  -D ENABLE_FAST_MATH=1 \  -D CUDA_FAST_MATH=1 \  -D WITH_CUBLAS=1 \  -D BUILD_EXAMPLES=ON \  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.3/modules .. 
&gt; -- Looking for ccache - not found
&gt; -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.2.3") 
&gt; -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
&gt; -- Looking for linux/videodev.h
&gt; -- Looking for linux/videodev.h - not found
&gt; -- Looking for linux/videodev2.h
&gt; -- Looking for linux/videodev2.h - found
&gt; -- Looking for sys/videoio.h
&gt; -- Looking for sys/videoio.h - not found
&gt; -- Checking for module 'libavresample'
&gt; --   No package 'libavresample' found
&gt; -- found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
&gt; -- at: /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippicv_lnx
&gt; -- found Intel IPP IW sources: 2017.0.3
&gt; -- at: /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippiw_lnx
&gt; -- LAPACK(Atlas): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libcblas.so;/usr/lib/x86_64-linux-gnu/libatlas.so
&gt; -- LAPACK(Atlas): Support is enabled.
&gt; -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
&gt; -- The imported target "vtkRenderingPythonTkWidgets" references the file
&gt;    "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
&gt; but this file does not exist.  Possible reasons include:
&gt; * The file was deleted, renamed, or moved to another location.
&gt; * An install or uninstall procedure did not complete successfully.
&gt; * The installation package was faulty and contained
&gt;    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
&gt; but not all the files it references.
&gt; 
&gt; -- The imported target "vtk" references the file
&gt;    "/usr/bin/vtk"
&gt; but this file does not exist.  Possible reasons include:
&gt; * The file was deleted, renamed, or moved to another location.
&gt; * An install or uninstall procedure did not complete successfully.
&gt; * The installation package was faulty and contained
&gt;    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
&gt; but not all the files it references.
&gt; 
&gt; -- Found VTK 7.1.1 (/usr/lib/cmake/vtk-7.1/UseVTK.cmake)
&gt; -- Caffe:   NO
&gt; -- Protobuf:   NO
&gt; -- Glog:   NO
&gt; -- freetype2:   YES
&gt; -- harfbuzz:    YES
&gt; -- HDF5: Using hdf5 compiler wrapper to determine C configuration
&gt; -- Module opencv_ovis disabled because OGRE3D was not found
&gt; -- 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.
&gt; -- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
&gt; -- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
&gt; -- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
&gt; -- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
&gt; -- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
&gt; -- HDF5: Using hdf5 compiler wrapper to determine C configuration
&gt; -- freetype2:   YES
&gt; -- harfbuzz:    YES
&gt; -- Checking for modules 'tesseract;lept'
&gt; --   No package 'tesseract' found
&gt; --   No package 'lept' found
&gt; -- Tesseract:   NO
&gt; -- OpenCL samples are skipped: OpenCL SDK is required
&gt; -- 
&gt; -- General configuration for OpenCV 3.4.3 =====================================
&gt; --   Version control:               unknown
&gt; -- 
&gt; --   Extra modules:
&gt; --     Location (extra):            /home/vincent/opencv_contrib-3.4.3/modules
&gt; --     Version control (extra):     unknown
&gt; -- 
&gt; --   Platform:
&gt; --     Timestamp:                   2018-09-22T22:13:51Z
&gt; --     Host:                        Linux 4.15.0-34-generic x86_64
&gt; --     CMake:                       3.10.2
&gt; --     CMake generator:             Unix Makefiles
&gt; --     CMake build tool:            /usr/bin/make
&gt; --     Configuration:               RELEASE
&gt; -- 
&gt; --   CPU/HW features:
&gt; --     Baseline:                    SSE SSE2 SSE3
&gt; --       requested:                 SSE3
&gt; --     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
&gt; --       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
&gt; --       SSE4_1 (5 files):          + SSSE3 SSE4_1
&gt; --       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
&gt; --       FP16 (2 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
&gt; --       AVX (6 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
&gt; --       AVX2 (11 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
&gt; --       AVX512_SKX (1 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
&gt; -- 
&gt; --   C/C++:
&gt; --     Built as dynamic libs?:      YES
&gt; --     C++11:                       YES
&gt; --     C++ Compiler:                /usr/bin/c++  (ver 7.3.0)
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
&gt; --     C Compiler:                  /usr/bin/cc
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
&gt; --     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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
&gt; --     Linker flags (Release):      
&gt; --     Linker flags (Debug):        
&gt; --     ccache:                      NO
&gt; --     Precompiled headers:         YES
&gt; --     Extra dependencies:          dl m pthread rt
&gt; --     3rdparty dependencies:
&gt; -- 
&gt; --   OpenCV modules:
&gt; --     To be built:                 aruco bgsegm bioinspired calib3d ccalib core 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 viz xfeatures2d ximgproc xobjdetect xphoto
&gt; --     Disabled:                    js matlab world
&gt; --     Disabled by dependency:      -
&gt; --     Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv java ovis python3 sfm
&gt; --     Applications:                tests perf_tests examples apps
&gt; --     Documentation:               NO
&gt; --     Non-free algorithms:         YES
&gt; -- 
&gt; --   GUI: 
&gt; --     GTK+:                        YES (ver 3.22.30)
&gt; --       GThread :                  YES (ver 2.56.2)
&gt; --       GtkGlExt:                  NO
&gt; --     VTK support:                 YES (ver 7.1.1)
&gt; -- 
&gt; --   Media I/O: 
&gt; --     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
&gt; --     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
&gt; --     WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020e)
&gt; --     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
&gt; --     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
&gt; --     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
&gt; --     OpenEXR:                     build (ver 1.7.1)
&gt; --     HDR:                         YES
&gt; --     SUNRASTER:                   YES
&gt; --     PXM:                         YES
&gt; -- 
&gt; --   Video I/O:
&gt; --     DC1394:                      YES (ver 2.2.5)
&gt; --     FFMPEG:                      YES
&gt; --       avcodec:                   YES (ver 57.107.100)
&gt; --       avformat:                  YES (ver 57.83.100)
&gt; --       avutil:                    YES (ver 55.78.100)
&gt; --       swscale:                   YES (ver 4.8.100)
&gt; --       avresample:                NO
&gt; --     GStreamer:                   
&gt; --       base:                      YES (ver 1.14.1)
&gt; --       video:                     YES (ver 1.14.1)
&gt; --       app:                       YES (ver 1.14.1)
&gt; --       riff:                      YES (ver 1.14.1)
&gt; --       pbutils:                   YES (ver 1.14.1)
&gt; --     libv4l/libv4l2:              NO
&gt; --     v4l/v4l2:                    linux/videodev2.h
&gt; -- 
&gt; --   Parallel framework:            pthreads
&gt; -- 
&gt; --   Trace:                         YES (with Intel ITT)
&gt; -- 
&gt; --   Other third-party libraries:
&gt; --     Intel IPP:                   2017.0.3 [2017.0.3]
&gt; --            at:                   /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippicv_lnx
&gt; --     Intel IPP IW:                sources (2017.0.3)
&gt; --               at:                /home/vincent/opencv-3.4.3/build/3rdparty/ippicv/ippiw_lnx
&gt; --     Lapack:                      YES (/usr/lib/x86_64-linux-gnu/liblapack.so /usr/lib/x86_64-linux-gnu/libcblas.so /usr/lib/x86_64-linux-gnu/libatlas.so)
&gt; --     Eigen:                       YES (ver 3.3.4)
&gt; --     Custom HAL:                  NO
&gt; --     Protobuf:                    build (3.5.1)
&gt; -- 
&gt; --   OpenCL:                        YES (no extra features)
&gt; --     Include path:                /home/vincent/opencv-3.4.3/3rdparty/include/opencl/1.2
&gt; --     Link libraries:              Dynamic load
&gt; -- 
&gt; --   Python 2:
&gt; --     Interpreter:                 /home/vincent/miniconda2/bin/python2.7 (ver 2.7.15)
&gt; --     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.15rc1)
&gt; --     numpy:                       /home/vincent/miniconda2/lib/python2.7/site-packages/numpy/core/include (ver 1.15.1)
&gt; --     packages path:               lib/python2.7/site-packages
&gt; -- 
&gt; --   Python (for build):            /home/vincent/miniconda2/bin/python2.7
&gt; -- 
&gt; --   Java:                          
&gt; --     ant:                         NO
&gt; --     JNI:                         NO
&gt; --     Java wrappers:               NO
&gt; --     Java tests:                  NO
&gt; -- 
&gt; --   Matlab:                        YES
&gt; --     mex:                         /usr/local/MATLAB/R2018b/bin/mex
&gt; --     Compiler/generator:          Not working (bindings will not be generated)
&gt; -- 
&gt; --   Install to:                    /usr/local
&gt; -- -----------------------------------------------------------------
&gt; -- 
&gt; -- Configuring done
&gt; -- Generating done
&gt; -- Build files have been written to: /home/vincent/opencv-3.4.3/build
&gt; 

</code></pre></div>
<p dir="auto">The documentation for fisheye::project algorithm has an error in it (I spent a day reimplementing<br>
to figure this out).</p>
<p dir="auto">On line 203 calib3d,hpp we have:<br>
<code class="notranslate">\f[x' = (\theta_d / r) x \\ y' = (\theta_d / r) y \f]</code></p>
<p dir="auto">'x' and 'y' should be replaced with 'a' and 'b':<br>
<code class="notranslate">\f[x' = (\theta_d / r) a \\ y' = (\theta_d / r) b \f]</code></p>
<p dir="auto">This might save another poor soul later.</p>
<p dir="auto">--wayne</p>