translate: Returns an array of images of length num_images randomly...

Description Usage Arguments Value Examples

Description

Translate takes the path to and image and generates randomly translated images, the desired number of times. Each translated image will not be translated more than the maximum distance provided. The translation can be in any direction.

Usage

1
translate(image_path, num_images, max_translation)

Arguments

image_path

string: The file path of the image to be translated.

num_images

integer: The number of translated images to be returned.

max_translation

integer: The maximum distance in pixels that the image can be translated.

Value

array: pixel values of the translated images

Examples

1
2
3
4
5
6
7
## Not run: 
translate("../tests/testthat/img/milad.jpg", 5, 10)
translate("../tests/testthat/img/milad.jpg", 10, 20)
translate("../tests/testthat/img/milad.jpg", 15, 50)
translate("../tests/testthat/img/milad.jpg", 20, 100)

## End(Not run)

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