ElliShape (Morphology Analysis tools)

Introduction

Elliptic Fourier analysis (EFA) is a powerful tool for shape analysis, which is often employed in geometric morphometrics. The EFA procedure was developed by Kuhl and Giardina in 1982, and formed the basis for various EFA-based software ever since. EFA-based morphological analysis involved contour (outline) extraction, elliptic Fourier descriptors (EFDs) calculation and EFDs normalization. However, the normalization of EFDs has shown persistent challenges in obtaining unique results in basic contour transformations, leading to plenty of workload in manual alignment, and contemporary contour extraction methods struggle to efficiently handle complex biological forms.

Here, we reformulated the procedure of EFDs calculation to improve computational efficiency, and introduced a novel approach for EFD normalization, termed “true EFD normalization”, which remains invariant under all basic contour transformations. They are of essential importance when dealing with mass contour curves collected from different platforms with different transformations. Based on these improvements, we have developed ElliShape, a user-friendly software facilitating improved contour (outline) extraction, efficient EFDs calculation, and true EFD normalization. Especially in the contour extraction, an interactive approach integrates automatic contour generation for efficiency and manual correction for essential modifications and refinements.

Moreover, the output annotated images and EFDs from ElliShape could be applied in artificial intelligence training, which is fundamental to advancing artificial intelligence in botany, leading to innovative solutions for critical challenges in biodiversity conservation, species classification, ecosystem function assessment, and related critical issues.

Fig. 1 The outlined approach for obtaining the elliptic Fourier descriptors
Fig.2 The outline procedure of elliptic Fourier descriptor normalization.

Software

To facilitate the proposed EFA-based morphological analysis, we developed ElliShape in python platform with graphical user interface (GUI), which can provide user-friendly outline extraction and complete EFD normalization. We also provided command line scripts to ensure better cross-platform compatibility and quantitative analysis of morphology in large dataset processing.

The GUI version consists of two parts: contour/outline extraction and EFA, as illustrated in Fig. 3. The contour/outline extraction module involves target selection, segmentation, contour outlining after manual correction, and chain code generation. The segmentation step utilizes the Otsu thresholding method or the Segment Anything Model (SAM) algorithm to automatically generate a binary image with a bright foreground (object) region and a dark background region, facilitating subsequent contour outlining. After chain code generation, the EFA module transitions to a new section for acquiring complete normalized EFDs and visualizing reconstructed shapes.

Fig 3. ElliShape software architecture, which consists of two main components: contour/outline extraction and elliptic Fourier analysis. The contour/outline extraction component involves three primary functions: extraction, image processing, chain code, measurement and save.

Download and compile

You can download the application with GUI and the application with command line scripts.

Please refer to manual for usage instructions.

The relevant ElliShape training Dataset used in this paper is available.

Online demo

We have successfully developed and launched the online demo, to encourage global public participation in specimen exploration.

Reference

Kuhl F P , Giardina C R . (1982).Elliptic Fourier features of a closed contour.Computer Graphics & Image Processing, 18(3):236-258.DOI:https://doi.org/10.1016/0146-664X(82)90034-X.
Reliable and superior elliptic Fourier descriptor normalization and its application software ElliShape with efficient image processing.