Skip to content

Instantly share code, notes, and snippets.

@3846masa
Last active October 7, 2015 09:50
Show Gist options
  • Save 3846masa/e3fe1696d2feefb7eed9 to your computer and use it in GitHub Desktop.
Save 3846masa/e3fe1696d2feefb7eed9 to your computer and use it in GitHub Desktop.
Ubuntuでコンピュータビジョンを受講する人向けOpenCVインストール方法 #FMSCV

Ubuntuでコンピュータビジョンを受講する人向けOpenCVインストール方法

おれもわからん

Clang入れる

sudo apt-get install clang

おしまい

OpenCV入れる

Ubuntu14.04にOpenCVをインストールする : mwSoft blog

git clone https://github.com/jayrambhia/Install-OpenCV.git
cd Install-OpenCV/Ubuntu
./opencv_latest.sh

途中でパスワードを聞かれるので入力する

おしまい

Atomで遊べるようにする

拡張機能buildを入れる

apm install build

プロジェクトフォルダを作って開く

プロジェクトフォルダのルートに.atom-build.jsonを作る

参考:www.icrus.org/horiba/article/2014_11_07_01.php

{
  "cmd": "clang++",
  "args": [
    "{FILE_ACTIVE}",
    "-g", "-O0",
    "-o",
    "{FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE}.out",
    "`pkg-config --cflags opencv`",
    "`pkg-config --libs opencv`"
  ],
  "errorMatch": [
    "\\n(?<file>[^:]+):(?<line>\\d+):(?<col>\\d+)"
  ]
}

Ctrl + Alt + Bでビルドできる

(もしくは,Ctrl + Shift + PBuild: Triggerを選ぶ)

おしまい

さいごに

サンプルコード動いたけど,この先どんな障害があるかわからないのでやめといたほうがいい

どうせWindowsとかMacとかもってるだろ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment