brew doctor get warning on opencv
Homebrew's doctor command is very helpful. Since you installed OpenCV from source into the same directories that Homebrew is using, it's complaining about the unexpected files.

To solve the problem, just follow the instructions carefully. Homebrew tells you exactly what you need to do:


Make the /usr/local/lib/pkgconfig directory writable.
Delete the offending .dylib (/usr/local/lib/libopencv_*.dylib) and .pc files (/usr/local/lib/pkgconfig/opencv.pc).
Run brew link git. (Not directly related to OpenCV.)