4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenCV 3.X ソースビルド (Ubuntu)

Last updated at Posted at 2015-12-29

OpenCV 3.X をソースからビルドする。

参考

必要パッケージをインストールする。

sudo aptitude install build-essential
sudo aptitude install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo aptitude install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
sudo aptitude install ant

ソース取得

cd ~
git clone https://github.com/Itseez/opencv.git

ビルド

cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j4
  • 4行目末尾の「..」を忘れずに。
  • 5行目の「-j4」は、4プロセス並行でビルドするオプション。(付けなくてもいいし、-j2などでも良い)

インストール

sudo make install
  • /usr/local にインストールされる。
4
5
0

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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?