Install Homebrew to manage packages,
Then,
If you have Nvidia's graphic card, you could enable GPU compute capability as follows:
If your CUDA is not installed in /usr/local/cuda/lib
, before running ./install.sh
, you should change the following variables in ./install.sh
:
RPATH_CUDA=/usr/local/cuda/lib
Then, the apps in SDK could detect the CUDA runtime correctly.
Note: It is not recommended that install OpenCV or CUDA in a different location. Because the install.sh
not change the SDK libraries' rpath of them now. If you run the binary executables on Terminal, you could easily specify OpenCV and CUDA library search paths in ~/.bash_profile
like this:
CUDA_LIBDIR=/usr/local/cuda/lib OPENCV_LIBDIR=/usr/local/lib export DYLD_LIBRARY_PATH=$CUDA_LIBDIR:$DYLD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$OPENCV_LIBDIR:$DYLD_LIBRARY_PATH
After ./install.sh
, you could check the environment variables:
Then you could run the sample like this:
Please see "samples/README.md" to learn more about the samples.
Please see "tools/README.md".
If have issues when installing, you could make an attempt to find it in FAQ.