Ask Your Question
0

Opencv 4.1.1 can't find opencv_modules.h

asked 2019-10-29 03:40:29 -0600

Shay Weissman gravatar image

updated 2019-10-29 06:33:59 -0600

LBerger gravatar image

OpenCv 4.1.1 Visual studio 2019 Windows 10

I downloaded and compiled successfuly opencv 4.1.1 by cmake. when I try to compile a sample I get an error from base.hpp - can't find opencv_modules.hpp. I search the directory of the downloaded source package and the directory of the build and can't find it. I am using opencv for about 14 years upgrading versions many times. This is my first try with opencv 4 Thanks. C:\fakepath\cmake411.jpg It is txt with extention .jpg

Detected processor: AMD64
Found PythonInterp: C:/Program Files/Python365/python.exe (found suitable version "3.6.5", minimum required is "2.7") 
libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.1.1-libjpeg-turbo
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
Performing Test HAVE_CPUID_INFO
Performing Test HAVE_CPUID_INFO - Success
Detected InferenceEngine: cmake package
CMake Warning at cmake/OpenCVDetectInferenceEngine.cmake:83 (message):
InferenceEngine version have not been set, 2019R2 will be used by default.
Set INF_ENGINE_RELEASE variable if you experience build errors.
Call Stack (most recent call first):
CMakeLists.txt:845 (include)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: D:/Opencv411/python_loader
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': D:/TFS/LPR/IP/ThirdParty/OpenCv/opencv-4.1.1/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:1059 (include)

General configuration for OpenCV 4.1.1 =====================================
Version control: unknown

Platform:
Timestamp: 2019-10-28T15:16:56Z
Host: Windows 10.0.18362 AMD64
CMake: 3.16.0-rc2
CMake generator: Visual Studio 16 2019
CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe
MSVC: 1923

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 (15 files): + SSSE3 SSE4_1
SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (29 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe (ver 19.23.28105.4)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP8 /MD /O2 /Ob2 /DNDEBUG 
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR ...
(more)
edit retag flag offensive close merge delete

Comments

assuming you did build the INSTALL project, it should be generated in opencv/build/install/include

unlike using the prebuild libs, when using locally built opencv you have to rewire your include / linker path to the install folder

berak gravatar imageberak ( 2019-10-29 04:09:42 -0600 )edit

Thanks for answering. I compiled opencv 3.x.x many times and used them succesfuly for years. I downloaded opencv-4.1.1.zip. I unzipped it. I opened CMake. I set Where is the source files I set where to output the build. I ran configure and I ran generate. I than Opened the solution and compiled by vs2019.

I dont understand what I did wrong. Thanks

Shay Weissman gravatar imageShay Weissman ( 2019-10-29 04:26:20 -0600 )edit

https://www.dropbox.com/s/iqkysbv3hf2... Link to the output of cmake configure and generate

Shay Weissman gravatar imageShay Weissman ( 2019-10-29 04:33:59 -0600 )edit

please edit your question, and add it there, not on an external dropbox (where it'll expire), thank you ;)

berak gravatar imageberak ( 2019-10-29 04:37:09 -0600 )edit

Do you use opencv_contrib?

LBerger gravatar imageLBerger ( 2019-10-29 05:31:27 -0600 )edit

To berak : I edited and attached the file as .jpg although it is txt. To LBerger : Do I have to do something to use opencv_contrib? If yes than I did nothing for it. I used the default configuration with 2 changes: without IPP and with Inference engine.

Shay Weissman gravatar imageShay Weissman ( 2019-10-29 06:04:56 -0600 )edit

see l 138:

Install to: D:/Opencv411/install

so that's where your headers/libs should be.

berak gravatar imageberak ( 2019-10-29 06:11:33 -0600 )edit

@Shay Weissman you don't use opencv_contrib

LBerger gravatar imageLBerger ( 2019-10-29 06:12:23 -0600 )edit

d:/Opencv411/install was not created. 3rdparty,apps,bin, ... all where created install did not.

Shay Weissman gravatar imageShay Weissman ( 2019-10-29 06:54:28 -0600 )edit

May be an error occured in only one module and you don't see it check cmake build carrefully

LBerger gravatar imageLBerger ( 2019-10-29 07:42:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-10-29 06:56:50 -0600

Shay Weissman gravatar image

I now do it on another computer with windows 7. opencv_modules.hpp was created under opencv2

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-10-29 03:40:29 -0600

Seen: 890 times

Last updated: Oct 29 '19