R/parse_image.R

Defines functions parseImage

Documented in parseImage

#' parseImage
#'
#' Function for reading an image from a given directory path
#' @param imgPath Path to the image
#' @return Image <EBImage class>

parseImage <- function(imgPath) {
  tryCatch(
    expr = {
      img <- readImage(imgPath)
      return(img)
    },
    error = function(e) {
      stop(e)
    }
  )
}
vgorte/R-Seam-Carving documentation built on Aug. 5, 2019, 12:15 p.m.