我试图在MacOS El Capitan上为Python 3编译OpenCV 3.2.0。
当扫描目标opencv_tracking的依赖关系时,我收到此错误:
> /Users/hippolytedubois/opencv_contrib/modules/optflow/src/motempl.cpp:215:9: error:
> > use of undeclared identifier 'hal'
> > > hal::fastAtan2(dY_max_row, dX_min_row, orient_row, size.width, true);
> ^
> 1 error generated.
> make[2]: ***[modules/optflow/CMakeFiles/opencv_optflow.dir/src/motempl.cpp.o] Error 1
> make[1]: *** [modules/optflow/CMakeFiles/opencv_optflow.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
然后,过了一会儿,做了一些其他的建筑后:
> [ 35%] Linking CXX shared library ../../lib/libopencv_tracking.dylib
> [ 35%] Built target opencv_tracking
> make: *** [all] Error 2
这是我的CMake命令:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D PYTHON3_PACKAGES_PATH=~/.virtualenvs/cv3/lib/python3.4/site-packages
-D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib
-D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/include/python3.4m -D INSTALL_C_EXAMPLES=ON
-D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_EXAMPLES=ON
-D BUILD_opencv_python3=ON
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..