ifcb_count_mat_annotations.RdThis function processes .mat files, generated by the code in the `ifcb-analysis` repository (Sosik and Olson 2007), in a specified folder to count and summarize the annotations for each class based on the class2use information provided in a file.
ifcb_count_mat_annotations(manual_folder, class2use_file, skip_class = NULL)A character string specifying the path to the folder containing .mat files.
A character string specifying the path to the file containing the class2use variable.
A numeric vector of class IDs or a character vector of class names to be excluded from the count. Default is NULL.
A data frame with the total count of images per class.
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) {
# Count annotations excluding specific class IDs
result <- ifcb_count_mat_annotations("path/to/manual_folder",
"path/to/class2use_file",
skip_class = c(99, 100))
print(result)
# Count annotations excluding a specific class name
result <- ifcb_count_mat_annotations("path/to/manual_folder",
"path/to/class2use_file",
skip_class = "unclassified")
print(result)
}