mirror: Mirror an image

Description Usage Arguments Value Examples

Description

Mirror takes the path to an image and generates a mirrored version of that image in the horizontal direction, vertical direction, or both. It returns an array of pixel values for the mirrored image(s).

Usage

1
mirror(image_path, direction = "all")

Arguments

image_path

string: the file path of the image to be mirrored

direction

string: dirction of mirroring. Options: 'horizontal', 'vertical', 'all'. Defaults to 'all'

Value

array/matrix: pixel values of the original image and mirrored image(s)

Examples

1
2
3
4
5
6
7
## Not run: 
mirror("../tests/testthat/img/milad.jpg", "horizontal")
mirror("../tests/testthat/img/bw.png", "vertical")
mirror("../tests/testthat/img/bw.png", "all")
mirror("../tests/testthat/img/milad.jpg")

## End(Not run)

UBC-MDS/AutoTransformR documentation built on May 7, 2019, 7:13 p.m.