Runs the complete MycoHalo pipeline: import, dish detection and scale, optional colour calibration, flat-field correction, colour/texture pixel classification, seeded colony separation, measurement and QC.
analyze_plate(
path,
layout = plate_layout(),
id = NULL,
dish_diameter_mm = 90,
agar_fraction = 0.88,
dish = NULL,
mm_per_px = NULL,
reference = NULL,
reference_lab = c(50, 0, 0),
max_dim = 2000,
flat_field = TRUE,
classifier = NULL,
min_delta_e = 3,
min_area_mm2 = 0.5,
min_core_mm = 0.4,
morph_mm = 0.08,
edge_criterion = 0.5,
edge_exclude_mm = 0.1,
dark_L = NULL,
n_boot = 200L,
block_mm = 0.5,
ring_width_mm = 0.5,
profile_mode = c("absolute", "relative"),
n_rings = 10L,
qc_file = NULL,
keep_images = TRUE,
verbose = TRUE
)Image file or H x W x 3 sRGB array.
A plate_layout(). Use plate_layout(centre = "none") for
control plates without bacteria.
Plate identifier (default: file name).
Outer diameter of the dish (mm); sets the scale.
Fraction of the dish radius that is analysed.
Optional manual dish circle c(x, y, r) in working pixels.
Optional known scale (mm per working-image pixel);
overrides dish_diameter_mm.
Optional exposure / white-balance reference: a grey-card
region c(x, y, r) in relative image coordinates, or "agar"; see
model_background().
Known CIELAB of the reference.
Working resolution (longest side, px).
Apply illumination correction (recommended).
Optional supervised classifier (train_classifier()).
Minimum colour difference from agar for objects.
Segmentation settings, see
segment_colonies().
Measurement settings, see
measure_colonies().
Profile settings, see
colony_profiles().
Optional path of a PNG quality-control figure.
Keep image arrays in the result (needed for
plot_qc() later; set FALSE in large batches to save memory).
Print progress.
An object of class mycohalo_result, a list with
One row per expected colony (measure_colonies()).
Edge-to-centre profiles (colony_profiles()).
One row of plate-level measures and QC.
The processed plate (images and masks) if
keep_images = TRUE.
Settings used and QC warnings.
sim <- simulate_plate(width = 300, height = 400, seed = 10)
res <- analyze_plate(sim$image, id = "sim10", verbose = FALSE)
res
#> <mycohalo_result> plate "sim10"
#> • Scale: 0.2393 mm/px; agar L* = 22.2
#> • Colonies detected: 4 / 4; satellites: 1
#> • Bacterium r = 6.36 mm; halo outer r = 17.01 mm
#> colony_id area_mm2 L_mean MI_mean MI_lo MI_hi delta_MI_facing
#> TL 155 51.2 48.8 48.4 49.1 2.29
#> TR 156 46.9 53.1 52.7 53.4 2.51
#> BR 155 40.0 60.0 59.6 60.4 2.73
#> BL 156 57.7 42.3 42.0 42.6 -2.54
#> growth_inhibition_pct
#> 2.450
#> 0.270
#> -0.152
#> -7.634
res$colonies[, c("colony_id", "MI_mean", "delta_MI_facing")]
#> colony_id MI_mean delta_MI_facing
#> x TL 48.75743 2.293812
#> x1 TR 53.05115 2.514062
#> x2 BR 59.99747 2.729403
#> x3 BL 42.27137 -2.539792
if (FALSE) { # \dontrun{
res <- analyze_plate("plates/2026_05_26_20.JPG", layout = plate_layout())
plot_qc(res)
ctrl <- analyze_plate("plates/2026_05_26_37.JPG",
layout = plate_layout(centre = "none"))
} # }