공통 툴 및 라이브러리 설치
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev
소스 다운로드
cd ~
wget https://github.com/Itseez/opencv/archive/2.4.10.tar.gz
tar xvfz 2.4.10.tar.gz
cd opencv-2.4.10
mkdir build
cd build
빌드
cmake -D WITH_V4L=ON -D WITH_TBB=ON -D WITH_CUDA=ON -D WITH_OPENGL=ON -D WITH_QT=ON -D BUILD_EXAMPLES=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_NEW_PYTHON_SUPPORT=ON ..
make
sudo make install
pkg-config 패스(Path) 설정
vi ~/.bash_profile
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
공유 라이브러리 추가
sudo vi /etc/ld.so.conf.d/opencv.conf
/usr/local/lib
sudo ldconfig