Leaf Analyzer is an open-source GUI tool for automated measurement of leaf traits—area, dimensions, perimeter, count, green index, and percent damage (e.g., herbivory/disease). The application is implemented in MATLAB and distributed as a standalone program (no MATLAB license required). Installers are available for Windows, Linux, and macOS.
A detailed description is available in our article in Plant Phenomics: Leaf Analyzer: A Fully Automated and Open-Source Tool for High-Throughput Leaf Trait Measurement.
If you have any issues using the software, please feel free to raise them in the Issues page or report them to tao.hu@anu.edu.au.
2026/09/18 -- 🔥🔥 Leaf Analyzer v2.7.0: New pattern support and better MacOs experience.
2026/05/19 -- 🔥🔥 Leaf Analyzer online pattern overlay tool is available, for images taken without our pattern, see Sec. 1.4(https://techlauncher-leafanalyzer.github.io/AprilTag-Overlay-Tool/).
2026/05/05 -- 🔥🔥 Leaf Analyzer online pattern generator is available, click to customize your own pattern.
2026/02/13 -- 🔥🔥 Leaf Analyzer v2.6.0: New Green Leaf Index (GLI) Trait Measurement + Per-Leaf Exports to Spreadsheet.
2025/12/12 -- 🔥🔥 Leaf Analyzer v2.5.0: First public release
|
(a) |
![]() (b) |
![]() (c) |
![]() (d) |
![]() (e) |
![]() (a) |
![]() (b) |
![]() (c) |
![]() (d) |
![]() (e) |
![]() (a) |
![]() (b) |
![]() (c) |
![]() (d) |
![]() (e) |
![]() (f) |
![]() (g) |
![]() (h) |
![]() (i) |
![]() (j) |
![]() (k) |
![]() (l) |
![]() (m) |
![]() (n) |
![]() (o) |
![]() (p) |
![]() (q) |
![]() (r) |
![]() (s) |
![]() (t) |
Figure 4. More applications of Leaf Analyzer. (a-b): Petri dish plant leaf area measurement. (c-d): Petri dish seed germination monitoring, (e-f): 48-well plate hydroponic plant leaf area measurement. (g-h): nondestructive leaf area and dimensions measurement. (i-j): Silhouette leaf area measurement. (k-l): Seed counting. (m): An example root phenotyping pipeline using Leaf Analyzer.
Download the latest release from Releases and install the software according to the instructions:
| Operation System | Installation | Launching |
|---|---|---|
| Windows | Double click: LeafAnalyzerInstaller2.7_Windows.exe | Open via Start Menu → Leaf Analyzer (or the desktop shortcut, if created). |
| Linux | sudo ./ LeafAnalyzerInstaller2.7_Linux.install | ➢ cd /usr/Leaf_Analyzer/application ➢ ./run_Leaf_Analyzer.sh /usr/local/MATLAB/MATLAB_Runtime/R2025a/ |
| Mac OS | 1. First download the right Mac version according to your processor (Intel or Apple Silicon).
2. Unzip LeafAnalyzerInstaller2.7_Mac.zip. 3. Run the following command from the direcotry of the unzipped installer: xattr -d com.apple.quarantine LeafAnalyzerMacOS_AppleSilicon_Installer2.7_web.app 4. Then Control-click the unzipped installer file (LeafAnalyzerInstaller2.7_Mac.app) → Open |
Open via Applications → APPN → Leaf Analyzer (or Spotlight). |
Alternatively, if you have MATLAB R2025 installed, you can run Leaf Analyzer directly from the source code. Simply double-click Leaf_analyzer.mlapp to launch the application. Before running Leaf Analyzer, make sure the following MATLAB toolboxes are installed: Bioinformatics Toolbox, Computer Vision Toolbox, Deep Learning Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox.
Leaf Analyzer requires images captured with the Leaf Analyzer calibration pattern. For quick testing, use the datasets in Datasets.
To try your own images, first capture them with the pattern (see next section). See Capture images with the Leaf Analyzer pattern
You can customize your own pattern to a suitable size using our online pattern generator. Please make sure to print the generated PDF file at 100% scale for accuracy – you can check the pattern dimensions by comparing the actual measurements with a ruler and the numbers written on the top right corner of the PDF file. At the top of each PDF (to the right of the logo), you’ll see labels like 120×120–15 mm, which follow the format pattern width × pattern height – AprilTag side length. The Patterns folder contains some older version PDF pattern files (A4–A1). If you use those older version pattern files, you'll need to manually enter the pattern parameters in Settings → Pattern (Fig. 6b). If your pattern is generated by our online pattern generator, the pattern parameters should be automatically read by the software.
- Print PDFs at 100% scale on a standard office printer.
- Check the pattern dimensions with a ruler after it's printed.
- In Leaf Analyzer, enter the exact pattern dimensions in Settings → Pattern.
Note: 1). Leaves must be placed within the Region of Interest (Fig. 6a). Any objects beyond the cut-off line will be disregarded. 2). If you add text labels to the image, place them only in the reserved text region (Fig. 6a). The text must also be within 3 cm of the top border of the ROI. Currently, the text recognition model supports digits (0–9), letters (a–z, A–Z), and three special characters: dash(-), underscore(_), and dot(.).
![]() |
![]() |
Figure 6. (a) Pattern specifications. (b) Pattern tab on the Settings panel.
If your images don’t include the Leaf Analyzer calibration pattern but have a white (or light) background and an independent scale reference (e.g., a ruler), you can follow the steps:
- Overlay the Leaf Analyzer pattern onto the image using our online tool (https://techlauncher-leafanalyzer.github.io/AprilTag-Overlay-Tool/).
- Run Leaf Analyzer to measure traits in pixels. (Settings → Output → Units → pixel.)
- Convert to metric units using a known-length object in the image (by multiplying a constant factor in the output spreadsheet file).
Tip: The scale factor of area-based traits is the square of the factor for length-based traits.
Leaf morphological trait measurement demo Youtube link or Youku link
Leaf damage assessment demo Youtube link or Youku link
The default settings work in most cases. In the scenarios below, you may wish to adjust them.
Leaf Analyzer applies a minimum leaf area threshold to speed up processing and suppress background noise (e.g., dirt). By default, this threshold is 5% of the largest leaf area in the image. If some small leaves are not segmented because they are much smaller than the largest leaf (Fig. 7b), lower the threshold to include them (e.g., 1%; Fig. 7c).
Where: Settings → Advanced → Min leaf area.
![]() |
![]() |
![]() |
![]() |
Figure 7. (a) Original RGB image with large size variation among leaves. (b) Two very small leaves are missed with the default Min leaf area threshold. (c) All leaves are segmented after lowering the threshold to 1%. (d) Location of the Min leaf area control in the Settings panel.
By default, Leaf Analyzer performs hole filling during post-processing to improve object completeness. This could end up with undesired results (Fig. 8b). If so, disable the option to preserve internal holes (Fig. 8c).
Where: Settings → Advanced → Fill holes (check/uncheck).
![]() |
![]() |
![]() |
![]() |
Figure 8. (a) Leaf with holes/punches. (b) With Fill holes enabled (default), holes are filled. (c) Unchecking Fill holes preserves them, yielding the desired segmentation. (d) Location of the Fill holes toggle in the Settings panel.
The proposed LBS feature in the paper works well for leaf segmentation in most cases. However, in some challenging situations, more features may need to be added to improve the segmentation. For example, when leaves have strong reflection, you may need to incorporate texture features; when dark leaves are imaged under uneven lighting, you can add the Dark Green Color Index (DGCI) feature.
Where: Settings → Clustering → check/uncheck additional features.
![]() (a) |
![]() (b) |
![]() (c) |
![]() (d) |
![]() (e) |
Perspective correction is off by default. If images were captured at a skewed angle (not normal to the pattern plane), enabling this option can improve geometric accuracy (Fig. 10c).
Where: Settings → Advanced → Perspective correction.
![]() |
![]() |
![]() |
![]() |
Figure 10. (a) Image captured at an oblique angle. (b) Segmentation using default settings (perspective correction off). (c) Segmentation with Perspective correction enabled. (d) Location of the Perspective correction control in the Settings panel.
The default automatic Clustering method assumes that the ROI contains only the objects of interest against a white or light background. If the ROI includes unwanted objects or non-background colors (e.g., soil, pots/containers, or other clutter), you should switch to the Thresholding method, which applies HSV-based thresholding. The default thresholds are tuned for green colors, so if your leaves are green, this method should work out of the box (Fig. 11). If leaves are touching and you need per-leaf traits, enable Watershed in the settings and adjust the watershed minima threshold if needed (Fig. 11c).
Where: Settings → Advanced → Watershed.
![]() |
![]() |
![]() |
![]() |
Figure 11. (a) RGB image of Arabidopsis grown in a pot. (b) Location of the thresholding settings in the Settings panel. (c) Draw a polygon region of interest. (d) Per-channel histogram of the drawn region of interest.
If the default HSV thresholds do not work well, you can manually adjust the three channels (Hue, Saturation, Value) (Fig. 11). To estimate suitable value ranges for your object of interest, click Select Region (Fig. 11b) and draw a polygon region (Fig. 11c) to display the HSV histograms for the selected area (Fig. 11d). These histograms can guide threshold tuning for more accurate segmentation. You can also click Save Settings to store your thresholds for future use; next time, simply click Load Settings to restore the saved thresholds.
Note: If the leaves and the Leaf Analyzer pattern are not on the same plane (e.g., a potted plant as in Fig. 11a), trait measurements should be calibrated by multiplying a constant factor C. The calibration steps are simple (see Appendix A of our paper for details):
- Place a planar calibration target (e.g., a colored geometric shape) with known true area
A_refon the same plane as the plant. - Measure its area in Leaf Analyzer to obtain
A_I,ref. - Compute the calibration constant:
C = A_ref / A_I,ref
Once C is known, calibrate subsequent measurements as follows:
-
Length-based traits (e.g., length, width, perimeter):
L_C = L_I * sqrt(C)
whereL_Iis the value reported by Leaf Analyzer andL_Cis the calibrated value. -
Area-based traits (e.g., leaf area):
A_C = A_I * C
whereA_Iis the value reported by Leaf Analyzer andA_Cis the calibrated value.
If the relative displacement and orientation between the camera and the plant are kept fixed (e.g., using a tripod and a consistent setup), then C remains constant and the calibration only needs to be performed once.
If you find Leaf Analyzer useful in your research, please star ⭐ this repository and consider citing 📝:
@article{LeafAnalyzer,
title = {Leaf Analyzer: A fully automated and open-source tool for high-throughput leaf trait measurement},
journal = {Plant Phenomics},
volume = {8},
number = {1},
pages = {100145},
year = {2026},
issn = {2643-6515},
doi = {https://doi.org/10.1016/j.plaphe.2025.100145},
url = {https://www.sciencedirect.com/science/article/pii/S2643651525001517},
author = {Tao Hu and Richard Poire and Danielle Way}
}
Or
Tao Hu, Richard Poire, Danielle Way, Leaf Analyzer: A fully automated and open-source tool for high-throughput leaf trait measurement, Plant Phenomics, Volume 8, Issue 1, 2026, 100145, ISSN 2643-6515, https://doi.org/10.1016/j.plaphe.2025.100145. (https://www.sciencedirect.com/science/article/pii/S2643651525001517)




















































