Displays the plate and lets you click region centres for each class with graphics::locator() (finish each class with Esc / right-click). Works in RStudio's plot pane and in regular graphics devices.

annotate_plate(plate, classes = c("fungus", "bacteria", "halo"), r_mm = 0.5)

Arguments

plate

A plate processed by model_background().

classes

Classes to annotate, in order.

r_mm

Radius of each clicked region (mm).

Value

Data frame of regions suitable for extract_training_pixels().

Examples

if (FALSE) { # \dontrun{
reg <- annotate_plate(p)
clf <- train_classifier(extract_training_pixels(p, reg))
} # }