Homebrew is a package manager that allows you to install software. To install Homebrew, follow these Terminal command line instructions:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
install XCode Command Line Tools
Agree if asked to install XCode Command Line Tools.
brew graphviz (optional)
brew install graphviz
brew install ant
brew tap homebrew/science
if you are not comfortable with vim
brew edit opencv
within editor change:
if you have tried and failed to brew opencv before
brew remove opencv
brew install --build-from-source opencv