通过homebrew安装opencv

$ brew tap homebrew/science
$ brew install opencv

配置vim自动补全与查看源码,只有头文件

$ /usr/local/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q \
    /usr/local/include/opencv
$ mv tags ~/.vim/tags/opencv
$ /usr/local/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q \
    /usr/local/include/opencv2
$ mv tags ~/.vim/tags/opencv2
$ vim ~/.vimrc

    set tags+=~/.vim/tags/opencv
    set tags+=~/.vim/tags/opencv2