LoginSignup
53
52

More than 5 years have passed since last update.

Homebrew でOpenCVをインストールする方法

Last updated at Posted at 2013-05-12

homwbrew でOpenCVをインストールする方法

デフォルトのHomebrewではOpenCVはないがhomebrew-scienceを追加でインストールすることで
コンピュータサイエンス向けのライブラリをインストールできるようになる

homebrew-science https://github.com/homebrew/homebrew-science

前提条件

Homebrewがインストール済みであること

インストールの仕方

$ brew tap homebrew/science

試しにどんなものがインストール可能か見てみる
$ brew search open
libopennet open-mpi open-vcdiff openconnect openfst openrtsp openssl
open-babel open-ocd openblas opencore-amr openimageio opensc openvpn
open-cobol open-scene-graph opencc opencv openjpeg openslide
open-mesh open-sp opencolorio openexr openmeeg openslp

OpenCVのインストール自体はこれ
brew install opencv

これでおしまい

32bit 版をインストール

64bit版(たぶんOS準拠のbit数)がインストールされる、32bit版をインストールしたい場合はオプションを指定する(processing1.5系 利用の場合など)

brew options opencv
--32-bit
Build 32-bit only
--with-eigen
Build with eigen support
--with-jasper
Build with jasper support
--with-libtiff
Build with libtiff support
--with-opencl
Enable gpu code in OpenCV using OpenCL
--with-qt
Build the Qt4 backend to HighGUI
--with-tbb
Enable parallel code in OpenCV using Intel TBB

32bit版をビルドする場合は--32-bitをつければ良い

brew install opencv --32-bit

53
52
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
53
52