# \donttest{
# \dontshow{
if(require(opencv)) {
# }
library(magick)
library(opencv)
library(image.textlinedetector)
path <- system.file(package = "image.textlinedetector", "extdata", "cursive.png")
img <- ocv_read(path)
img <- ocv_grayscale(img)
img
up <- ocv_deslant(img)
up
img <- image_read(path)
img
image_deslant(img)
# \dontshow{
}
# End of main if statement running only if the required packages are installed
# }
# }
Run the code above in your browser using DataLab