imgfilter: Applies a filter to a given image to edit the visual...

Description Usage Arguments Value Examples

View source: R/imgfilter.R

Description

The filter types include 'blur' and 'sharpen'; where blur blends neighboring pixels and sharpen enhances edges. The strength of the filter indicates how much of effect is applied to the image; where 0 is no effect and 1 is very strong effect.

Usage

1
imgfilter(input_path, filter_type, strength, output_path = NULL)

Arguments

input_path

character the file path of the image

filter_type

character filter to be applied to the input image options: 'blur' and 'sharpen'

strength

numeric or integer (0 to 1); the strength of the selected filter effect

output_path

character or NULL (default NULL); the file path of the resultant image

Value

modified image array

Examples

1
2
input_path <- system.file("tmp_image", "mandrill.jpg", package = "rimager")
imgfilter(input_path, "blur", 0.2)

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