Learn R Programming

Morpho (version 2.1)

computeTransform: calculate an affine transformation matrix

Description

calculate an affine transformation matrix

Usage

computeTransform(x, y, type = c("affine", "rigid", "similarity"),
  reflection = FALSE)

Arguments

x
fix landmarks
y
moving landmarks
type
set type of affine transformation: options are "affine", "rigid" and "similarity" (rigid + scale)
reflection
logical: if TRUE "rigid" and "similarity" allow reflections.

Value

  • returns a 4x4 (3x3 in 2D case) transformation matrix

Examples

Run this code
data(boneData)
trafo <- computeTransform(boneLM[,,1],boneLM[,,2])
transLM <- applyTransform(boneLM[,,2],trafo)

Run the code above in your browser using DataLab