circropper: Crop the image to a circle

Description Usage Arguments Value Examples

View source: R/circropper.R

Description

Create a new image cropped by a circle mask and leave a margin

Usage

1
circropper(input_path, margin, output_path = NULL)

Arguments

input_path

character the image file path

margin

double the distance between circle boundary and the original image boundary

output_path

character if not NULL, the modified image will be saved in the provided folder path and name

Value

a cropped image

Examples

1
2
path <- system.file("tmp_image", "mandrill.jpg", package = "rimager")
circropper(path, 0, "new.png")

UBC-MDS/rimager documentation built on April 1, 2020, 4:36 a.m.