ifcb_extract_annotated_images.RdThis function extracts labelled images from IFCB (Imaging FlowCytobot) data, annotated using the MATLAB code from the `ifcb-analysis` repository (Sosik and Olson 2007). It reads manually classified data, maps class indices to class names, and extracts the corresponding Region of Interest (ROI) images, saving them to the specified directory.
ifcb_extract_annotated_images(
manual_folder,
class2use_file,
roi_folder,
out_folder,
skip_class = NA,
verbose = TRUE
)A character string specifying the path to the directory containing the manually classified .mat files.
A character string specifying the path to the file containing class names.
A character string specifying the path to the directory containing the ROI files.
A character string specifying the output directory where the extracted images will be saved.
A numeric vector of class IDs or a character vector of class names to be excluded from the count. Default is NULL.
A logical value indicating whether to print progress messages. Default is TRUE.
None. The function saves the extracted PNG images to the specified output directory.
Sosik, H. M. and Olson, R. J. (2007), Automated taxonomic classification of phytoplankton sampled with imaging-in-flow cytometry. Limnol. Oceanogr: Methods 5, 204–216.
if (FALSE) {
ifcb_extract_annotated_images(
manual_folder = "path/to/manual_folder",
class2use_file = "path/to/class2use_file.mat",
roi_folder = "path/to/roi_folder",
out_folder = "path/to/out_folder",
skip_class = 1
)
}