R/RcppExports.R

Defines functions thinImage whichToFill rgb2grayscale rgba2rgb

Documented in thinImage

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' rgba2rgb
#' 
#' Removes alpha channel from png image.
#'
#' @param img A 3-d array with slices R, G, B, and alpha.
#' @export
rgba2rgb <- function(img) {
    .Call(`_handwriter_rgba2rgb`, img)
}

#' rgba2rgb
#' 
#' Removes alpha channel from png image.
#'
#' @param img A 3-d array with slices R, G, B, and alpha.
#' @export
rgb2grayscale <- function(img) {
    .Call(`_handwriter_rgb2grayscale`, img)
}

#' whichToFill
#' 
#' Finds pixels in the plot that shouldn't be white and makes them black. Quick and helpful cleaning for before the thinning algorithm runs.
#'
#' @param img A binary matrix.
#' @export
whichToFill <- function(img) {
    .Call(`_handwriter_whichToFill`, img)
}

#' thinImage
#' 
#' This function returns a vector of locations for black pixels in the thinned image.
#' Thinning done using Zhang - Suen algorithm.
#'
#' @param img A binary matrix of the text that is to be thinned.
#' @export
thinImage <- function(img) {
    .Call(`_handwriter_thinImage`, img)
}
CSAFE-ISU/handwriter documentation built on May 13, 2018, 12:15 p.m.