sugr
Class ScaledMotion_3D

java.lang.Object
  extended bysugr.Element
      extended bysugr.Transformation
          extended bysugr.Homography_3D
              extended bysugr.Affinity_3D
                  extended bysugr.ScaledMotion_3D
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
Motion_3D

public class ScaledMotion_3D
extends Affinity_3D

This matrix contains Translation(3) and Rotation(3) and one Scalefactor for all three axis in 3D

Author:
Achim Königs
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Class version number for serialization
 
Fields inherited from class sugr.Homography_3D
DIM
 
Fields inherited from class sugr.Element
cov, MAXITER, v
 
Constructor Summary
ScaledMotion_3D()
          standard constructor.
ScaledMotion_3D(Translation_3D trans, Rotation_3D rot, double scale)
          creates a motion by a given Translation_3D and a Rotation_3D and a scale factor.
ScaledMotion_3D(Translation_3D trans, Rotation_3D rot, double scale, Matrix cov)
          creates a motion with covariance by a given Translation_3D and a Rotation_3D and a scale factor.
 
Method Summary
 void approximate(RelationalProperty[] rprops)
          Compute an approximation of an entity.
protected  Vector getConstraintValue()
          Get the value of the constraint (h(beta) or g(y)) if this entity is an unknown or an observation.
 int getDegreesOfFreedom()
          Returns the number of elements to specify this transformation
 Matrix getJacobianOfConstraint()
          Get the Jacobian of the constraint (H, G) if this entity is an unkown or an observation.
private static Matrix leaveOutProjectivePartsOfJacobian(Matrix A)
          Leave out those columns of the Jacobian of a ScaledMotion estimation which correspond to the 3 projective values (the last row of the transformation matrix)
 
Methods inherited from class sugr.Homography_3D
doCondition, getDimCol, getDimRow, getJacobianAfterFirst, getJacobianAfterSecond, getLineMatrix, getPlaneMatrix, getPointMatrix, transform
 
Methods inherited from class sugr.Transformation
errorProp, getDimension, getJacobianOfRelation, getReducedAB, getTransformationMatrix, getTransposeTransMatrix, transform
 
Methods inherited from class sugr.Element
calcCov, changeNullspace, changeNullspace, checkCovDim, checkElement, clone, ensureConstraints, estimate, estimate, gaussHelmertIterations, gaussHelmertIterationsOld, getCov, getV, normalizeSphere, normalizeSphereComparable, print, print, reduceFirstMatrix, reduceMatrix, reduceMatrix, setCov, setV, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Class version number for serialization

See Also:
Constant Field Values
Constructor Detail

ScaledMotion_3D

public ScaledMotion_3D()
standard constructor. Creates an identity matrix


ScaledMotion_3D

public ScaledMotion_3D(Translation_3D trans,
                       Rotation_3D rot,
                       double scale)
creates a motion by a given Translation_3D and a Rotation_3D and a scale factor.

Parameters:
trans - contains the Translation-matrix
rot - contains the rotation-matrix
scale - contains scale factor

ScaledMotion_3D

public ScaledMotion_3D(Translation_3D trans,
                       Rotation_3D rot,
                       double scale,
                       Matrix cov)
creates a motion with covariance by a given Translation_3D and a Rotation_3D and a scale factor.

Parameters:
trans - contains the Translation-matrix
rot - contains the rotation-matrix
scale - contains scale factor
cov - 16x16 matrix
Method Detail

getDegreesOfFreedom

public int getDegreesOfFreedom()
Returns the number of elements to specify this transformation

Overrides:
getDegreesOfFreedom in class Affinity_3D

approximate

public void approximate(RelationalProperty[] rprops)
Compute an approximation of an entity. The result of this method approximates the optimal solution which fullfills all the given relational constraints in an optimal way. The old values of the entity are overwritten. This is an overwritten method from Entity. In this implementation the projective parts of the transformation matrix are left out, because they are fixed to 0 (we have an affinity transformation!) and need NOT be estimated. So there are not 15 but only 12 parameters estimated which delivers a better estimate. Be careful if the number of observations is smaller than 12 ! Then the approximation is likely to fail. This is the case with e.g. 3 points which deliver only 3*3=9 constraints (which is sufficient for a scaled motion, but not of this approximation which delivers an affinity tranformation!) This approxmation can be put in Affinity_3D, because it delivers an affinity. But currently no constraints are implemented in Affinity_3D, so that an estimation of Affinity_3D delivers a homography_3D. As long as no constraints are implemented, leave this approximation here, because then all estimation related methods are together. No conditioning is done !

Overrides:
approximate in class Element
Parameters:
rprops - a set of relational Properties which should be fullfilled.

leaveOutProjectivePartsOfJacobian

private static Matrix leaveOutProjectivePartsOfJacobian(Matrix A)
Leave out those columns of the Jacobian of a ScaledMotion estimation which correspond to the 3 projective values (the last row of the transformation matrix)

Parameters:
A - a nx16 Jacobian matrix
Returns:
A without projective parts (nx13)

getConstraintValue

protected Vector getConstraintValue()
Get the value of the constraint (h(beta) or g(y)) if this entity is an unknown or an observation. This is, that the last row is 0 0 0 x , all rows are orthogonal to each other, the first three rows have the same length, and the whole vector has length 1

Overrides:
getConstraintValue in class Element
Returns:
the value of the constraint as a vector.

getJacobianOfConstraint

public Matrix getJacobianOfConstraint()
Get the Jacobian of the constraint (H, G) if this entity is an unkown or an observation.

Overrides:
getJacobianOfConstraint in class Element
Returns:
the Jacobian as a matrix.