ifcb_extract_classified_images.RdThis function reads a MATLAB classified sample file (.mat) generated by the `start_classify_batch_user_training` function from the `ifcb-analysis` repository (Sosik and Olson 2007), extracts specified taxa images from the corresponding ROI files, and saves each image in a specified directory.
ifcb_extract_classified_images(
sample,
classified_folder,
roi_folder,
out_folder,
taxa = "All",
threshold = "opt"
)A character string specifying the sample name.
A character string specifying the directory containing the classified files.
A character string specifying the directory containing the ROI files.
A character string specifying the directory to save the extracted images.
A character string specifying the taxa to extract. Default is "All".
A character string specifying the threshold to use ("none", "opt", "adhoc"). Default is "opt".
No return value, called for side effects. Extracts and saves taxa images to a 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) {
# Define the parameters
sample <- "D20230311T092911_IFCB135"
classified_folder <- "path/to/classified_folder"
roi_folder <- "path/to/roi_folder"
out_folder <- "path/to/outputdir"
taxa <- "All" # or specify a particular taxa
threshold <- "opt" # or specify another threshold
# Extract taxa images from the classified sample
ifcb_extract_classified_images(sample, classified_folder, roi_folder, out_folder, taxa, threshold)
}