filter_perrrfect: This function can be used to apply predefined or custom...

Description Usage Arguments Value Examples

View source: R/filter_perrrfect.R

Description

The function can be applied on images represented by cimg object. The users can choose from predefined filters or can create their new filters. This can be used for various purposes like entertainment application or visualization of convolutional neural network.

Usage

1
2
3
4
5
6
filter_perrrfect(
  image,
  filter_type = "blur",
  filter_size = 3,
  custom_filter = NULL
)

Arguments

image

A cimg object to representing the image

filter_type

One of the following values: "blur": Used to blur the picture "sharpen": Used to increase the sharpness of the image "custom": Allows users to use their own filter More options will be added as enhancements

filter_size

An integer determining the filter size. This is used if the filter_type is not custom. Default: 3

custom_filter

A 2d matrix that allows users to pass their own filter. This is only used if the users select filter_type = "custom"

Value

A cimg object representing the transformed image.

Examples

1
2
filter_perrrfect(imager::boats, filter_type="blur", filter_size=21L, custom_filter=NULL)
filter_perrrfect(imager::boats, filter_type="custom", custom_filter=matrix(0.01, 42, 21))

UBC-MDS/pictureperrrfect documentation built on March 28, 2021, 1:28 p.m.