1. CMake installation
  2. Orfeo toolbox installation
  3. GRM installation
In the following, we consider we are using the Ubuntu Linux distribution (Sorry for those who use Mac, Windows or a Linux distribution different from Debian. For once, Linux is given priority.)


To install the CMake software, you have two options:

For the first option, execute the following command
		sudo apt-get install cmake
For the second
		sudo apt-get install cmake cmake-curses-gui

Orfeo Toolbox (otb)

For Ubuntu 12.04 and higher, OTB development libraries are available as Debian packages through APT repositories. Since release 3.14.1, they are available in the ubuntugis-unstable repository.
You can add it by using this command lines:

		sudo aptitude install add-apt-repository  
		sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
		sudo apt-get update 
After you can run:
		sudo apt-get install libotb-dev
Other useful OTB packages are available. For more information click here, but for our library this command is enough.

GRM installation

First you have to download the source code here
or if you have git installed you can run:

		git clone
Then I suggest to create a directory where you will build the grm:
		mkdir grm_bin
and go to this directory:
 		cd grm_bin
First you have to generate the Makefile with cmake:
The previous commands works automatically if you have installed the otb development libraries from the package as I described before (in a standard way). If you have compiled from the source then you have to give the right otb directory path (where the OTBCMake.config is located).
Once the Makefile generated just run:
If everything is fine, you should have the GRM library in the sub-directory Code/ and the executable file into Applications/
I invite you to go to the next tutorial to learn how to segment an image.