This package includes functions that provide several different types of visual manipulations to an input image.
This package includes four main functions that accept an image as input and apply different types of manipulations and provide a new output image as summarized below:
Package data: A small set of example photos are included with the package for testing the functions, with some usage examples outlined below.
A variety of image processing packages providing some similar functionality already exist within the R ecosystem, including magick, imager, and OpenImageR. The purpose of our package is the provide functions that apply some common artistic filter transformations to a given input image.
The development version from GitHub with:
# install.packages("devtools")
devtools::install_github("UBC-MDS/Rmagine")
For additional documentation and usage examples please refer to the Introduction to image filtering with Rmagine vignette page and the Rmagine pkgdown page.
library(Rmagine)
vignette_filter(image_path, strength)
This function produces an image with reduced brightness around the periphery compared to the image center.
image_path
: file path of the input image (string)strength
: parameter for strength of the dimming effect (double,
optional). If not specified, defaults to 1.0Here’s an input photo taken at Coronado Beach, San Diego:
And here’s that image after applying the vignette filter:
vignette_filter("imgs/coronado_beach.jpeg", 1.0)
imager
testthat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.