Ask Your Question

--marc's profile - activity

2016-02-05 00:02:12 -0600 received badge  Enthusiast
2016-02-03 12:54:02 -0600 received badge  Supporter (source)
2016-02-03 09:22:58 -0600 received badge  Teacher (source)
2016-02-02 06:38:33 -0600 received badge  Necromancer (source)
2016-02-01 15:59:18 -0600 answered a question OpenCV reference documentation integration for Qt Creator (.qch)

I was able to build a mostly-complete .qch for OpenCV 3.1.0 as follows...

Main Build

cd PATH_TO/opencv-3.1.0
mkdir build; cd build
cmake -D CMAKE_INSTALL_PREFIX=/opt/opencv/3.1.0-qt5-gl \
      -D WITH_QT=5 \
      -D WITH_OPENGL=ON \
      -D WITH_OPENCL=OFF \
      -D BUILD_DOCS=ON \
      -D CMAKE_DOXYGEN_GENERATE_QHP=ON \
      -D CMAKE_BUILD_TYPE=RELEASE  ..
make -j7

Documents Build

cd doc  # goto PATH_TO/opencv-3.1.0/build/doc
make help
    The following are some of the valid targets for this Makefile:
   [...snip...]
    ... doxygen
    ... test
    ... package_source
    ... install/local

make -j7 doxygen

cd doc/doxygen/html
qhelpgenerator index.qhp -o opencv-3.1.0.qch

NOTE: In my case, there was a unmatched, dangling </section> tag at line 37157. If needed, comment out this line and rerun qhelpgenerator.

2016-01-18 16:44:51 -0600 received badge  Student (source)
2016-01-11 23:23:00 -0600 received badge  Editor (source)
2016-01-11 23:12:01 -0600 asked a question OpenCV 3.1.0 & OpenCL version?

Q1. Which version of OpenCL is supported by OpenCV 3.1.0?

My guess is OpenCL 1.2 based on the set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2") statement in the file opencv-3.1.0/cmake/OpenCVDetectOpenCL.cmake.

Also, the cl.h OpenCL include path is opencv-3.1.0/3rdparty/include/opencl/1.2/CL

Q2. If OpenCL 1.2 is a supported version, would the following build errors be a bug to report? or some other action to resolve?

opencv-3.1.0/modules/core/src/opengl.cpp:1644:9: error: use of undeclared identifier
   'clGetGLContextInfoKHR_fn'; did you mean 'clGetContextInfo'?
    clGetGLContextInfoKHR_fn clGetGLContextInfoKHR = (clGetGLContextInfoKHR_fn)
    ^~~~~~~~~~~~~~~~~~~~~~~~
    clGetContextInfo

opencv-3.1.0/modules/core/src/opengl.cpp:1646:14: error: use of undeclared identifier
  'clGetGLContextInfoKHR'; did you mean 'clGetContextInfo'?
    if (!clGetGLContextInfoKHR)
         ^~~~~~~~~~~~~~~~~~~~~
         clGetContextInfo

opencv-3.1.0/modules/core/src/opengl.cpp:1669:52: error: use of undeclared identifier
  'CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR'
    status = clGetGLContextInfoKHR(properties, CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR, ...
                                               ^

opencv-3.1.0/modules/core/src/opengl.cpp uses the symbols clGetGLContextInfoKHR, clGetGLContextInfoKHR_fn, CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR

However, /System/Library/Frameworks/OpenCL.framework/Headers/cl.h does not contain those particular 3 symbols.

BUILD FAILS WITH_OPENCL

cmake -D CMAKE_INSTALL_PREFIX=/opt/opencv/3.1.0_test \
  -D WITH_QT=5 \
  -D WITH_OPENGL=ON \
  -D WITH_OPENCL=ON \
  -D CMAKE_BUILD_TYPE=RELEASE  ..

BUILD OTHERWISE SUCCEEDS WITHOUT OPENCL

cmake -D CMAKE_INSTALL_PREFIX=/opt/opencv/3.1.0_test \
  -D WITH_QT=5 \
  -D WITH_OPENGL=ON \
  -D WITH_OPENCL=OFF \
  -D CMAKE_BUILD_TYPE=RELEASE  ..

PLATFORM: OS X 10.10.5, Qt 5.5.1, OpenCL 1.2 (/System/Library/Frameworks/OpenCL.framework/Headers/cl.h)

Device Intel Core i7-4960HQ CPU @ 2.60GHz supports OpenCL 1.2
Device Iris Pro supports OpenCL 1.2 
Device GeForce GT 750M supports OpenCL 1.2