List of Packages for Computer Vision Developers (Ubuntu 14.04)
Published: 2015-10-27 18:56:59
Categories: Systems Engineering & Tooling
Tags: computer vision, opencv, programming packages linux, ubuntu common developer packages
I am a somewhat intermediate developer mainly focusing on computer vision related development. I recently had to upgrade to Ubuntu 14.04 (Trusty) and it turned out I rely on quite a lot of libraries and tools which are not available by default.
Feel free to mention packages/libraries that you as a developer often use. Scroll to the end to see the entire list together.
Basic Setup
I really hate Unity. GNOME installation:
sudo apt-get install gnome-session-fallback
GVIM. I am a vim lover :P.
sudo apt-get install vim-gnome
Right-click open terminal utility is pretty useful. This is commonly available in RedHat but not on Ubuntu.
sudo apt-get install nautilus-open-terminal
nautilus -q && nautilus
I find the long directory name that Ubuntu displays on terminal to be annoying. Put this in $HOME/.bashrc:
export PS1="[\u@\[\e[34;1m\]\H \[\e[0m\]\W]\$ "
Dropbox, Google Chrome: no-brainer here. Just download the latest Debian packages from their respective webpages.
Latex
If you are into scientific writing, use latex. MS Word is not what the community prefers. Even if you are a casual writer, no harm in using latex. It will help you stay organized. Latex is no more for monotonous documents and thesis. You can build beautiful presentations, posters, and even books with Latex. latextemplates.com has superb templates to get you started. If you have not used latex before, there are tons of beginner tutorials out there. I use Kile (a latex IDE).
sudo apt-get install kile
sudo apt-get install texlive-science texlive-latex-extra
sudo apt-get install kbibtex
Mathematics Packages
Octave. Scripting language with good support for matrix operations. Open source alternative of Matlab.
sudo apt-get install octave
Maxima. Symbolic algebra. If you are into algebraic manipulation, Maxima can relieve a lot of stress.
sudo apt-get install wxmaxima
Eigen. A powerful, fast, and user-friendly linear algebra library.
Build from source:
# download from http://eigen.tuxfamily.org/index.php?title=Main_Page
unzip
mkdir build_dir
cmake ..
make
sudo make install
With apt:
sudo apt-get install libeigen3-dev
Programming Tools
GCC compiler suite:
sudo apt-get install build-essential cmake
Git:
sudo apt-get install git
Doxygen:
sudo apt-get install doxygen
Valgrind (code profiling). I had written a blog on profiling here.
sudo apt-get install valgrind
Common -dev Packages
sudo apt-get install libtbb-dev
sudo apt-get install libusb-dev
sudo apt-get install libtiff5-dev libpng++-dev libpng12-dev
sudo apt-get install libavcodec-dev libav-tools
Qt5
Qt is a cross-platform application framework widely used for GUI software. In addition to Qt GUI, you can program databases and network features. This comes in handy when you have lots of data in SQL databases and need to compute with it. A while ago I wrote Qt tutorials here and here.
sudo apt-get install qt5-default qttools5-dev-tools
sudo apt-get install qtcreator
CUDA Installation
GPU programming. If you have NVIDIA GPU you may want to install CUDA. Be warned that this can sometimes mess with your X server (graphical interface on Ubuntu). I installed CUDA 7.5 on Ubuntu 14.04 x86_64.
Get deb packages from Cuda-download (NVIDIA). Official installation guide (Linux).
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda
Set your .bashrc:
export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
OpenCV
Computer vision libraries. An indispensable tool for image processing and computer vision projects. With OpenCV 3, it provides features like image stitching and 3D reconstruction.
I prefer building from source. See my detailed post on OpenCV installation on Ubuntu 14.04 from source code.
CMake configuration I used:
# Download from http://opencv.org/ or clone from https://github.com/Itseez/opencv
cmake ../ -DCMAKE_BUILD_TYPE=RELEASE -DWITH_TBB=ON -DWITH_QT=ON -DWITH_OPENMP=ON -DWITH_PTHREADS_PF=ON -DWITH_OPENNI2=ON -DBUILD_EXAMPLE=ON -DENABLE_FAST_MATH=ON -DBUILD_EXAMPLES=ON -DBUILD_PERF_TESTS=ON
make && make install
Once installation is successful, compile and run a basic image read/display example: docs.
You may choose to install OpenCV-contrib (extra modules): https://github.com/Itseez/opencv_contrib.
Easy way out (Ubuntu package, usually older):
sudo apt-get install libopencv-dev python-opencv
ROS (Robot Operating System)
ROS provides functionality for inter-process communication tailored to programming robots. I use it mainly for robotic vision and visualization with rviz.
Installation instructions: http://wiki.ros.org/jade/Installation/Ubuntu
If you are new to ROS start with tutorials: http://wiki.ros.org/ROS/Tutorials
If you need OpenCV with all bells and whistles, install ROS from source: http://wiki.ros.org/jade/Installation/Source
Other Useful Libraries
CERES solver. Non-linear least squares. Useful in geometric computer vision: http://ceres-solver.org/
Python Packages
sudo apt install python-pip
sudo pip install beautifulsoup4
sudo pip install lxml
Miscellaneous Tools
MeshLab. If you need to work with 3D point clouds (transformations, visualization, tinkering), MeshLab may be useful.
sudo apt-get install meshlab
sudo apt-get install blender # point-cloud/mesh work
sudo apt-get install scrot # screenshot utility
sudo apt-get install screen # multi-screen utility
Summary
# basic
sudo apt-get install gnome-session-fallback
sudo apt-get install nautilus-open-terminal
nautilus -q && nautilus
# latex
sudo apt-get install kile
sudo apt-get install texlive-science
sudo apt-get install texlive-latex-extra
# .bashrc
export PS1="[\u@\[\e[34;1m\]\H \[\e[0m\]\W]\$ "
export PATH=$PATH:$HOME/bin:
# matlab
sudo mount -o loop R2015a-glnxa64.iso /mnt
http://download.ust.hk/apps/site/info/matlab.html
export LM_PROJECT=ECE_DEPT_ALL
sudo apt-get install octave
sudo apt-get install wxmaxima
# core dev
sudo apt-get install build-essential
sudo apt-get install git
sudo apt-get install valgrind
sudo apt-get install vim-gnome
sudo apt-get install cmake
sudo apt-get install doxygen
# cuda 7.5
https://developer.nvidia.com/cuda-downloads
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda
# eigen
# download from http://eigen.tuxfamily.org/index.php?title=Main_Page
unzip
mkdir build_dir
cmake ..
make
sudo make install
# qt5
sudo apt-get install qt5-default qttools5-dev-tools
sudo apt-get install qtcreator
# opencv
sudo apt-get install libtbb-dev
sudo apt-get install libtiff5-dev
sudo apt-get install libpng++-dev libpng12-dev
sudo apt-get install libavcodec-dev
sudo apt-get install libav-tools
cmake ../ -DCMAKE_BUILD_TYPE=RELEASE -DWITH_TBB=ON -DWITH_QT=ON -DWITH_OPENMP=ON -DWITH_PTHREADS_PF=ON -DWITH_OPENNI2=ON -DBUILD_EXAMPLE=ON -DENABLE_FAST_MATH=ON -DBUILD_EXAMPLES=ON -DBUILD_PERF_TESTS=ON
# ros
http://wiki.ros.org/jade/Installation/Source
http://wiki.ros.org/jade/Installation/Ubuntu