Install OpenCV3.1 on Mac by brew

Install

  1. brew update

  2. brew info opencv3

  3. brew tap homebrew/science

  4. Only use OpenCV3 in default setting.
    brew install opencv3 --with-contrib

Crazing install (Not Recommend!!!)

brew install opencv3 --with-contrib --with-cuda --with-gphoto2 --with-gstreamer --with-jasper --with-libdc1394 --with-opengl --with-openni2 --with-tbb --with-vtk --with-java --without-opencl

Note that:
–without-opencl: conflict with build-in opencl in Mac(/System/Library/Frameworks/OpenCL.framework).

Result in terminal

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you’ll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/opencv3/lib
CPPFLAGS: -I/usr/local/opt/opencv3/include

-lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab

你可能感兴趣的:(mac,brew,opencv)