transform: This function performs a rigid body transformation of a...

Description Usage Arguments Value Examples

Description

This function performs a rigid body transformation of a surface file

Usage

1
transform(im, u = 0, v = 0, theta = 0, method = "imwarp")

Arguments

im

cimg object

u, v

numerical indicating the displacement in the x and y direction (in pixels)

theta

numerical indicating the angle of rotation (in degrees)

method

method for interpolation (one of "taylor" or "imwarp")

Value

a transformed cimg object

Examples

1
2
3
4
5
6
7
8
surf <- ground[[1]]
par(mfrow = c(1,2), mar = c(2,2,1,1))
plot(surf)
plot(transform(surf, theta = 45))
plot(transform(surf, 0.5, 0))
plot(transform(surf, 0.5, method = 'taylor'))
plot(transform(surf, theta = 1))
plot(transform(surf, theta = 1, method = 'taylor'))

coldfir3/surf documentation built on May 13, 2019, 8:49 p.m.