README.md

Rmagine

codecov R-CMD-check

Package Overview & Scope

This package includes functions that provide several different types of visual manipulations to an input image.

Features

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:

  1. Tunnel distortion: produces an image with strong visual distortion intended to create a tunnel or pincushion effect
  2. Colour filters: produces an image with different user-specified colour distortions (ex: blue tone)
  3. Edge detection: identifies edges by looking at where the image brightness changes sharply, and produces a black and white image highlighting the locations of these edges
  4. Vignetting: produces an image with reduced brightness around the periphery compared to the image center

Package data: A small set of example photos are included with the package for testing the functions, with some usage examples outlined below.

Our Package in the R Ecosystem

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.

Installation

The development version from GitHub with:

# install.packages("devtools")
devtools::install_github("UBC-MDS/Rmagine")

Usage

For additional documentation and usage examples please refer to the Introduction to image filtering with Rmagine vignette page and the Rmagine pkgdown page.

Using the Vignette Filter

library(Rmagine)
vignette_filter(image_path, strength)

This function produces an image with reduced brightness around the periphery compared to the image center.

Arguments

Example

Here’s an input photo taken at Coronado Beach, San Diego: Sample
Image

And here’s that image after applying the vignette filter:

vignette_filter("imgs/coronado_beach.jpeg", 1.0) Vignette
Effect

Package Dependencies



UBC-MDS/Rmagine documentation built on March 29, 2020, 9:12 p.m.