StartEndTranslate: Translate a Trajectory Based on Start and End Points

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A function to translate, rotate and scale the points of trajectory2 using trajectory1. The new trajectory will have the same start and end points as trajectory1.

Usage

1
StartEndTranslate(traj1, traj2)

Arguments

traj1

An m x n matrix containing trajectory1. Here m is the number of points and n is the dimension of the points.

traj2

A k x n matrix containing trajectory2. Here k is the number of points and n is the dimension of the points. The two trajectories are not required to have the same number of points.

Details

Every point of trajectory2 is rotated, scaled and translated so that the start and end points of the two trajectories match. The new variation of trajectory2 is returned as a matrix.

Value

An m x n matrix containing the new variation of trajectory2 is returned. Here m is the number of points and n is the dimension of the points.

Author(s)

Kevin Toohey

See Also

LCSSTranslation, AveTranslate

Examples

1
2
3
4
5
6
# Creating two trajectories.
path1 <- matrix(c(0, 1, 2, 3, 0, 1, 2, 3), 4)
path2 <- matrix(c(0, 1, 2, 3, 4, 5, 6, 7), 4)

# Running the translation.
StartEndTranslate(path1, path2)

SimilarityMeasures documentation built on May 1, 2019, 10:06 p.m.