gpt4 book ai didi

OpenCV:为什么主分支中没有 OCL 模块?

转载 作者:行者123 更新时间:2023-12-02 16:56:30 25 4
gpt4 key购买 nike

系统信息:WINdows 7 , 64 bit on INtel celeron dual core
我正在从 master 分支构建 OpenCV 库。按照 opencv 文档中的所有说明进行操作后,我得到了构建目录。但是我发现我的 OCL 目录不见了。我在这里:
C:\Users\Hesh\Documents\opencv_built\modules

为什么会这样?

这是 cmake generate 的输出:

The CXX compiler identification is MSVC 16.0.30319.1
The C compiler identification is MSVC 16.0.30319.1
Check for working CXX compiler using: Visual Studio 10 2010 Win64
ICV: Unpacking ippicv_windows_20140429.zip to C:/Users/Hesh/Documents/opencv_source/opencv/3rdparty/ippicv/unpack...
ICV: Package successfully downloaded
found IPP (ICV version): 8.1.1 [8.1.1]
at: C:/Users/Hesh/Documents/opencv_source/opencv/3rdparty/ippicv/unpack/ippicv_win
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
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
CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_core".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
modules/core/CMakeLists.txt:28 (ocv_add_accuracy_tests)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_flann".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/flann/CMakeLists.txt:2 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_imgproc".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/imgproc/CMakeLists.txt:2 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target
"opencv_test_imgcodecs". Use the target name directly with
add_custom_command, or use the generator expression $<TARGET_FILE>, as
appropriate.

Call Stack (most recent call first):
modules/imgcodecs/CMakeLists.txt:130 (ocv_add_accuracy_tests)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_highgui".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
modules/highgui/CMakeLists.txt:125 (ocv_add_accuracy_tests)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target
"opencv_test_features2d". Use the target name directly with
add_custom_command, or use the generator expression $<TARGET_FILE>, as
appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/features2d/CMakeLists.txt:2 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_calib3d".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
模块/视频/CMakeLists.txt:2 (ocv_define_module)
此警告适用于项目开发人员。使用 -Wno-dev 来抑制它。
CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_shape".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/shape/CMakeLists.txt:2 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target
"opencv_test_stitching". Use the target name directly with
add_custom_command, or use the generator expression $<TARGET_FILE>, as
appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/stitching/CMakeLists.txt:2 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_test_videoio".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
modules/videoio/CMakeLists.txt:233 (ocv_add_accuracy_tests)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVModule.cmake:795 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target
"opencv_test_superres". Use the target name directly with
add_custom_command, or use the generator expression $<TARGET_FILE>, as
appropriate.

Call Stack (most recent call first):
cmake/OpenCVModule.cmake:655 (ocv_add_accuracy_tests)
modules/superres/CMakeLists.txt:7 (ocv_define_module)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_calib3d". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_core". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_features2d".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_flann". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_highgui". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_imgcodecs".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_imgproc". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_ml". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_nonfree". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_objdetect".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_optim". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_photo". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_shape". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_stitching".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_superres".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_ts". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_video". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_videoio". Use
the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The LOCATION property should not be read from target "opencv_videostab".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
CMakeLists.txt:560 (include)
This warning is for project developers. Use -Wno-dev to suppress it.


General configuration for OpenCV 3.0.0-dev =====================================
Version control: 2.4.9-4336-g9e3124a

Platform:
Host: Windows 6.1 AMD64
CMake: 3.0.0
CMake generator: Visual Studio 10 2010 Win64
CMake build tool: C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
MSVC: 1600

C/C++:
Built as dynamic libs?: YES
C++ Compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe (ver 16.0.30319.1)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /MD /O2 /Ob2 /D NDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MD /O2 /Ob2 /D NDEBUG /Zi
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
Precompiled headers: YES

OpenCV modules:
To be built: core flann imgproc imgcodecs highgui features2d calib3d ml nonfree objdetect optim photo video shape stitching videoio superres ts videostab
Disabled: world
Disabled by dependency: -
Unavailable: androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev java matlab python viz

Windows RT support: NO

Use GCD NO
Use Concurrency YES
Use C=: NO
Use Cuda: NO
Use OpenCL: YES

OpenCL:
Version: dynamic
Include path: C:/Users/Hesh/Documents/opencv_source/opencv/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO

Python:
Interpreter: NO

Java:
ant: NO
JNI: NO
Java tests: NO

Matlab:
mex: NO

Tests and samples:
Tests: YES
Performance tests: YES
C/C++ Examples: NO

Install path: C:/Users/Hesh/Documents/opencv_built/install

cvconfig.h is in: C:/Users/Hesh/Documents/opencv_built
-----------------------------------------------------------------

Configuring done

你可以看到,上面写着 Use OpenCL = YES,那为什么模块 OCL 没有来?

编辑

我发现实际上在模块下的 master 分支中,缺少 OCL:

看这里:

https://github.com/Itseez/opencv/tree/master/modules

但它存在于 2.4.9.x 中

https://github.com/Itseez/opencv/tree/2.4.9.x-prep/modules

为什么会这样?

我想为 3.0.0 构建库,我认为这只能从 master 分支,但现在因为它缺少 OCL 模块,我该怎么办?我需要最新 3.0.0 中的 OCL

最佳答案

OpenCV 的主分支已切换到“透明 API”设计。该 API 将 CPU 和 OpenCL 实现放在一个统一的 API 下。因此不再需要单独的“ocl”模块。以下是描述更改的演示文稿:presentation .

关于OpenCV:为什么主分支中没有 OCL 模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24913097/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com