dnordgren / DistributedImageProcessing

Exploring OpenCV image processing speedup by distributing images to a cluster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install OpenCV (latest) for RHEL

# inspired by http://superuser.com/questions/678568/install-opencv-in-centos
sudo yum groupinstall "Development Tools"
sudo yum install gcc cmake git gtk2-devel pkgconfig numpy ffmpeg
sudo mkdir /opt/working
cd /opt/working
sudo git clone https://github.com/Itseez/opencv.git
cd opencv
sudo mkdir release
cd release
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
sudo make
sudo make install

Configure OpenCV build paths

  1. Add OpenCV package config: $ touch /usr/local/lib/pkgconfig/opencv.pc
  2. Add the following lines to .bashrc and source it:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
  1. Add the following flags to the package config:
$ pkg-config --cflags opencv
$ pkg-config --libs opencv

Next, add OpenCV library location to make linking work.

  1. Create a opencv.conf file at /etc/ld.so.conf.d/.
  2. Add the location of your OpenCV library to the opencv.conf file (probably /usr/local/lib)
  3. Run sudo ldconfig -v

You should now be able to run any OpenCV executable.

Compile OpenCV code

To compile any .cpp OpenCV program, use the Makefile like: $ make <program_name_without_extension>

About

Exploring OpenCV image processing speedup by distributing images to a cluster.


Languages

Language:C++ 87.2%Language:Shell 9.0%Language:Makefile 3.8%