classification of hemp fibers based on morphological features



In this workflow, you can use MorphoLibJ to generate accurate morphometric measurements

  • First the fibers are segmented by mathematical morphology:
    • for example by using MorphoLibJ:
      • Create a marker image by creating a rough mask with extended regional maxima (similar to Find Max), such that you have one max per fiber
      • Use the marker controlled watershed (in MorpholLibJ/ Segmentation/ marker controlled watershed) : indicate the original grayscale image as the input, Marker will be your maxima image, select None for mask
      • it will create a label mask of your fibers
  •  In MorphoLibJ /analyze/ select Region Morphometry: this will compute different shape factors which are more robust than the ones implemented by default in ImageJ
  • Export the result table created to a csv file
  • Then for example in Matlab or R, you can apply a PCA analysis (Principal component analysis) followed by a k-means with the number of class (clusters) (different fibers type) you want to separate.
  • You can then add this class as a new feature to your csv file.
  • From this you can sort your labelled fibers into these clusters for a visual feedback or further spatial analysis
has topic
hemp analysis



MorphoLibJ is a library of plugin for ImageJ with functionalities for image processing such as filtering, reconstructing, segmenting, etc... Tools are based on Mathematical morphology with more rigorous mathematical approach than in the standard tools of ImageJ in particular for surface (or perimeter) measurements which are usually based on voxel counting.

Programming language: JAVA

Among features:

* Morphological operations :  Dilation, Erosion, Opening,  Closing , Top hat (white and black), Morphological gradient (aka Beucher Gradient), Morphological Laplacian, Morphological reconstruction, Maxima/Minima , Extended Maxima/Minima -Watershed (classic or controlled) -Image overlay -Image labelling -Geodesic diameter -Region Adjacency Graph -Granulometry curves, morphological image analysis.

User skill : Life scientist, developers, analysts

several steps of morphological segmentation of plant tissue using MorphoLibJ.



Adiposoft is an automated Open Source software for the analysis of adipose tissue cellularity in histological sections.

Example data can be found on the plugin description page in ImageJ wiki (download link). There is also a link to a MATLAB version of the workflow.

has topic

Segmentation of Clustered Cells in MATLAB


A clear tutorial on how to write a MATLAB script to segment clustered cells.

The full script is downloadable near the bottom of the article. 

Splitting clustered cells


A clear tutorial for splitting connected particles (cells) in a binary mask.

has function

Tissue Cell Segmentation


This macro is meant to segment the cells of a multicellular tissue. It is written for images showing highly contrasted and uniformly stained cell membranes. The geometry of the cells and their organization is automatically extracted and exported to an ImageJ results table. This includes: Cell area, major, minor fitted ellipse radii + major axis orientation and number of neighbors of the cells. Manual correction of the automatic segmentation is supported (merge split cells, split merged cells).

Sample image data is available in the documentation page. 



This library gives the numpy-based infrastructure functions for image processing with a focus on bioimage informatics. It provides image filtering and morphological processing as well as feature computation (both image-level features such as Haralick texture features and SURF local features). These can be used with other Python-based libraries for machine learning to build a complete analysis pipeline.

Mahotas is appropriate for users comfortable with programming or builders of end-user tools.

==== Strengths

The major strengths are in speed and quality of documentation. Almost all of the functionality is implemented in for multiple dimensions. It can be used with other Python packages which provide additional functionality.

Mahotas and all packages on which it relies are open-source.