Skip to content

Instantly share code, notes, and snippets.

@prabhakaran9397
Created October 19, 2017 17:58
Show Gist options
  • Save prabhakaran9397/46afc2945f4d619b11d78d5918d0e9b3 to your computer and use it in GitHub Desktop.
Save prabhakaran9397/46afc2945f4d619b11d78d5918d0e9b3 to your computer and use it in GitHub Desktop.
Plant CV Installation
# Update the system
apt-get update
# Install software dependencies
apt-get install build-essential unzip cmake libgtk2.0-dev python-dev python-numpy python-gtk2 python-matplotlib libavcodec-dev libavformat-dev libswscale-dev libdc1394-22 libjpeg-dev libpng-dev libjasper-dev libtiff-dev libtbb-dev sqlite3
# Install additional Perl packages
# Note: if this is your first time using CPAN on your system you may be asked some initial setup questions
perl -MCPAN -e 'install DBI'
perl -MCPAN -e 'install DBD::SQLite'
perl -MCPAN -e 'install Config::Tiny'
perl -MCPAN -e 'install Capture::Tiny'
# Install OpenCV
# Here we demonstrate using Git but you can alternatively download the package from SourceForge. This tutorial assumes you clone OpenCV to /home
git clone https://github.com/Itseez/opencv.git
cd opencv
# Checkout release 2.4.8 (highest version tested)
git checkout 2.4.8
# Compile OpenCV. Here we set the install directory to /home/lib/opencv. Either use the default install location (if you have administrator privileges) or install to a directory that is appropriate for your system
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/lib/opencv -D WITH_TBB=ON /home/opencv/
make
make install
# Install PlantCV
# This tutorial assumes you clone PlantCV to /home
git clone https://github.com/danforthcenter/plantcv.git
# Edit your BASH profile to include the OpenCV and PlantCV libraries. Use your favorite editor to edit .profile and add the following line:
export PYTHONPATH=$PYTHONPATH:$HOME/lib/opencv/lib/python2.7/dist-packages:$HOME/plantcv/lib
# Reload your BASH profile
source .profile
cd plantcv
git checkout v1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment