Learn R Programming

Momocs (version 0.2-6)

coo.baseline: Re-register a list or matrix of coordinates.

Description

coo.baseline registers coo on a (new) baseline, e.g. Bookstein's coordinates.

Usage

coo.baseline(coo, ldk1 = 1, ldk2 = 2, t1=c(-0.5, 0), t2=c(0.5, 0))

Arguments

coo
A list or a matrix of coordinates.
ldk1
Row index of the first reference landmark.
ldk2
Row index of the second reference landmark.
t1
(x; y) coordinates of the first target point.
t2
(x; y) coordinates of the second target point.

Value

  • Returns a matrix of (x; y)coordinates.

Details

coo.baseline returns by default Bookstein's coordinates.

Examples

Run this code
def.par <- par(no.readonly = TRUE)
layout(matrix(1:2, 1, 2))
data(bot)
coo <- bot@coo[[1]]
coo <- coo.sample(coo, 12)
coo.plot(coo, main="Some landmarks", points=TRUE)
coo.plot(coo.baseline(coo), border="red", col=NA,
    points=TRUE, main="Reregistered using Bookstein's coordiantes")
abline(v=c(-0.5, 0.5), col="grey60", lty=2)
box()
par(def.par)

Run the code above in your browser using DataLab