Imprimer cette page

Grey scale mathematical morphology granulometry

french version

Granulomorphogui is a graphical interface developed in Matlab for computing grey level granulometric curves from mathematical morphology on image collections.


Key features of the application include:

  • use of mathematical morphology functions such as closing or opening
  • computation of granulometric curves, obtained when the size of the structuring element varies
  • application to grey scale images, avoiding image segmentation
  • batch processing: all the images in a directory are processes the same way, making it possible to apply groupwise analyses
  • the different processing steps were embedded within a graphical user interface.



The following figure shows an example of the graphical user interface obtained during the analysis of a collection of images.

GranuloMorphoGUI software in use

Download and install

In order to use the "granulomorphogui" software:

  • download the file (version: 2016, april 07)
  • extract the archive
  • run Matlab, and go to the created directery
  • launch the function "setupGranulo.m" (all needed path depencies are updated)
  • run the function "granulomorphogui": the GUI opens, and you can complete the options


The interface is in french, however terms should be easily understandable. The different steps of the analysis are:

  1. Selection of the directory containing images to process, and optional spatial calibration of images. After selection, the list of images is displayed on right
  2. Optional selection of the region of interest (binary images with same size as the original images)
  3. Selection of a result file
  4. Spatial calibration
  5. Choice of the analysis type
  6. Choice of the structuring element type
  7. Choice of the maximum number if iterations, and eventually of the step
  8. Eventual display of intermediary results (slower, but allows control)
  9. When all options are set, a click on "Demarrer" will start the analysis.

For each image, a granulometric curve is computed by applying the chosen settings. The result is stored in the file specified at step 3. Another file with suffix <file>.cg1.txt contains the derivatives, easier to process for further analysis.

General information

  • Authors: Marie-Françoise Devaux (original version), David Legland (maintenance)
  • Target: Matlab (graphical application), tested under Windows and Linux.
  • Licence: LGPL
  • Support: David Legland (david[dot]legland (at) nantes[dot]inra[dot]fr)


If you use this software, please be kind to cite one the publications below:

  • Devaux, M.F. & Legland, D. (2014) Grey level granulometry for histological image analysis of plant tissues, in Microscopy: advances in scientific research and education, Méndez-Vilas, A. (Ed.), Formatex Research Center, 681-688 (html) (pdf)
  • Legland, D.; Devaux, M.F.; Bouchet, B.; Guillon, F. & Lahaye, M. (2012) Cartography of cell morphology in tomato pericarp at the fruit scale. J. Miscrosc. 247:78-93
  • Devaux, M.F.; Bouchet, B.; Legland, D.; Guillon, F. & Lahaye, M. (2008) Macro-vision and grey level granulometry for quantification of tomato pericarp structure Postharvest Biol. Technol. 47, 199-209
  • Devaux, M.F.; Robert, P.; Melcion, J. P. & Le Deschault de Monredon, F. (1997) Partical size analysis of bulk powders using mathematical morphology Powder Technology, 90, 141-147

Additional information on mathematical morphology can be found in books :

  • P. Soille (2003) "Morphological Image Analysis, principles and applications", Second edition, Springer
  • J. Serra (1982) "Image Analysis and mathematical morphology, volume 1", Academic Press


See also

  • ijGranulometry: an implementation of this methodology for the ImageJ software