Anthocyanin & Leaf Image Analysis

User Guide

A browser tool for plant phenotyping: segment the plant, calibrate colour and scale against the AstroBotany Astrocalibration marker, quantify leaf area and vegetation / pigment indices (NGRDI, mACI, Green Index), and export the numbers — for a single image or a whole timelapse. Everything runs in your browser; nothing is uploaded.

0

Getting started

Open the tool — it loads with a demo image (a Medicago ground-control plate with an Astrocalibration marker). Use the tabs on the left to move through the workflow: Segmentation → Calibration & Units → Results → Generate Report. To analyse your own photo, click Upload (top-right). For best results, photograph the plant flat and well-lit with the Astrocalibration marker in the same frame.

💡 What is the Astrocalibration marker? The AstroBotany Bio-Imaging Spectrum 5 cm sticker — four corner fiducials, a colour-chip row, a grayscale ramp and a 0–5 cm ruler. It lets the tool colour-correct the image and convert pixels to cm. Get one at astrobotany.com.
1

Segment the plant

The Segmentation tab isolates vegetation from the background using the Excess-Green index (ExG = 2G − R − B). Green pixels above the threshold are counted as plant.

Segmentation tab with the ExG threshold and auto-threshold controls annotated
The Segmentation tab. Green overlay = detected plant.
  1. Workflow tabs — step through Segmentation → Calibration → Results. Generate Report builds a printable page.
  2. Tool bar — pan (hand), select (arrow), and the rectangle / ellipse / lasso shape tools, plus undo & delete.
  3. Canvas — your image with the live green segmentation overlay. Scroll to zoom, drag with the hand to pan.
  4. ExG Threshold — drag to tune what counts as plant. Lower = more pixels included.
  5. Auto threshold — one click computes the threshold from the image histogram: Otsu (best general choice), Triangle (dominant background), IsoData, Mean.
Use a shape tool on this tab to draw exclusion zones over anything that shouldn't count (soil, labels, the marker itself).
2

Calibrate colour & scale

The Calibration & Units tab colour-corrects the image against the marker and sets the pixels-per-cm scale so areas come out in cm².

Calibration tab with the Detect marker, scale and colour reference controls annotated
The Calibration & Units tab, with the Astrocalibration marker in frame.
  1. Detect / place marker — one click finds the marker's four corner fiducials and computes an affine colour correction to the Astro standard. On a clean, flat marker this "just works" (residual ≈ 0.12); otherwise drag the four purple corner handles onto the fiducials — put the top-left handle on the ASTROBOTANY / plus corner — until the pink chip-dots sit on the colour patches. Tick Apply colour correction.
  2. Scale & Units — enter the marker's physical edge length, click Draw box over marker, and drag a box across it to get pixels/cm (so area reports in cm²). Tilt & Lens sliders correct rotation/distortion.
  3. Colour Reference (manual fallback) — sample grey / white / black patches to white-balance if you're not using the full marker correction.
Colour correction and scale are optional — you can quantify without them — but they make results comparable across photos and give absolute cm² areas.
3

Draw regions of interest

On the Results tab, outline each plant or cohort so its statistics are measured separately.

Results tab with visualization modes, draw region, analysis groups, CSV and batch controls annotated
The Results tab — draw regions, read stats, and export.
  1. Visualization modes — view the plant as RGB or as an NGRDI / mACI / GI heat-map.
  2. Draw a region — click it (or pick ▢ ○ ⬡ in the toolbar) and drag on the image to outline a plant. The tool stays active so you can draw several; each group can hold several shapes. Use + to start a new group.
  3. Analysis Groups — live per-group stats: projected area (cm²), NGRDI, mACI, Green Index. Rename a group by typing its name; the trash icon deletes it. Select a region and press Del to remove it, Ctrl+Z to undo.
  4. Download all as CSV — one row per region group (area, NGRDI, mACI, GI, estimated anthocyanin, mean RGB, plus calibration context). Opens cleanly in Excel.
  5. Batch processing — apply the current ROIs, threshold and calibration to many frames and get one combined CSV: click Run on ExoLab-11 GRW08 timelapse (set how many frames to skip with the stride box), or Add images… to batch your own. Best when the frames share the reference image's camera framing.
🔁 Batch tip: load one representative frame, set the threshold + calibration and draw your ROIs on it, then run the batch — those exact regions and settings are reused on every frame.
7

Automate in Python (PlantCV Pro)

For fully-automatic, reproducible batch runs, the companion PlantCV Pro notebook does marker detection → affine_color_correction → segmentation → indices → CSV in Python/OpenCV, sharing the same 15-chip standard and index definitions as this tool. Open it in Google Colab, point it at your images, and run.

⌨

Keyboard shortcuts & indices

VSelect / move / resize
R C LRectangle / ellipse / lasso
HPan the image
Del / ⌫Delete the selected region
Ctrl+ZUndo
EscBack to Select & deselect
ExG = 2G − R − B
Excess-Green — separates plant from background.
NGRDI = (G−R)/(G+R)
Greenness / canopy vigour proxy.
mACI = R / G
Modified anthocyanin content index (higher = more red/anthocyanin).
GI = G / (R+G+B)
Green fraction.