Tomato cotyledon color analyzer

Cotyledon and Seedling Growth Analyzer

This page hosts a data acquisition javascript app to assist my work with tomato and other nightshades. The app focues on measuring cotyledon color and early seedling growth from photographs of seedlings grown on agar plates. Select areas of each cotyledon to measure grayscale brightness and CIELAB color, trace primary roots and hypocotyls to measure their lengths, count visible lateral roots, and record whether root hairs are visible. All image processing happens in your browser, and you can export your measurements as CSV files for analysis. JavaScript Code produced with ChatGPT and Gemini.

The current version assumes five seedlings were placed onto agar media midline on 9 cm square Petri dishes.

About my images — I just use my Galaxy A13 phone fixed on a camera mount at a defined distance over the plate, the dishes generally on black background. Diffused lighting is provided at the sides of the plate. The dish cover is removed before taking the image. I typically include a unit measure in camera shot, but also just use the dimensions of the square plate for unit scale.

Analyzer features

  1. Cotyledon color: Sample selected areas for 8-bit grayscale brightness and CIELAB color values. Label each sample by seedling, cotyledon, and leaf surface.
  2. Seedling identification: Use a five-position planting grid or assign seedlings manually.
  3. Growth measurements: Trace curved primary roots and hypocotyls. Calibrate the image with a known distance to measure lengths in millimeters.
  4. Lateral root counts: Mark each visible lateral root to tally counts by seedling.
  5. Root hair observations: Record root hairs as present, absent, or indeterminate based on visual inspection.
  6. CSV export: Download individual color measurements, cotyledon and seedling summaries, and seedling morphology data.
  7. Local image processing: Open JPEG, PNG, or WebP images directly in your browser. Images stay on your device.

To use the analyzer

  1. Open a photo of seedlings grown on an agar plate, then use the on-screen tools to guide the analysis:
  2. Identify seedlings. Mark the corners of the planting area to set a five-position grid, or assign seedlings manually.
  3. Sample cotyledon color. Click or drag to place a circular sampling area on a cotyledon. Select the seedling, cotyledon, and leaf surface to label the grayscale and CIELAB measurements.
  4. Measure growth. Click the endpoints of a known distance to calibrate the image in millimeters. Then click along each primary root or hypocotyl to trace its length.
  5. Record root features. Click each visible lateral root to count it, and score root hairs by visual inspection as present, absent, or indeterminate.
  6. Export results. Download individual color readings, cotyledon and seedling summaries, and growth measurements as CSV files.

Cotyledon Color & Seedling Extractor

8-bit grayscale and CIELAB (D65) • All processing stays in this browser; no image upload to a server.

Pixel lengths only
Choose a JPEG, PNG, or WebP image to begin.

Grid: click opposite corners of the planting region (left-to-right seed order). Sample ROI: click to place a circle, or drag outward to size it. Pan: select Pan or hold Shift and drag. Mouse wheel zooms at the pointer. Assign bent seedlings manually using Seedling ID or Seed coat / assign. The seed coat tool records a reference point for the selected seedling, but does not measure its color.

Color preview appears when hovering over an image.
Measurements: 0 ROIs
Seedling morphology

Optional calibration: enter a known distance in mm, select Calibrate length, and click the two endpoints of that distance on the image. Use a ruler marking or a measured plate dimension. Trace: select Seedling ID, click successive points along the primary root or hypocotyl, and press Finish trace (or double-click the endpoint). Use Undo to remove the last point while tracing. Lateral roots: click each visible lateral root once; Undo removes the last marker. Counts refer to lateral roots, not microscopic root hairs. Pixel lengths are always reported. Calibration also fills in millimeter lengths for all traces on this image. Clear calibration to return to pixels only. Root hairs are assessed visually as Present, Absent, Indeterminate, or Not assessed; this is not an automated image measurement.

No active trace.
SeedlingPrimary root (px)Primary root (mm)Hypocotyl (px)Hypocotyl (mm)Lateral rootsRoot statusRoot hairs (visual)
Individual ROI measurements
ROISeedlingCotyledonSurfaceXYRadiusPixelsGray8L*a*b*ColorDelete
No measurements yet.
Cotyledon summary (mean ± sample variance)
SeedlingCotyledonSurfacen ROIsGray8 mean / varL* mean / vara* mean / varb* mean / var
No measurements yet.

Sample variance is calculated among ROI means (n−1 denominator), and is blank for n=1. Seedling summaries average cotyledon means with equal cotyledon weight, separately by leaf surface. No zero values are assigned to missing cotyledons or ungerminated seeds. Image colors are not calibrated to an external color reference.