public class RigidModel3D extends AbstractAffineModel3D<RigidModel3D> implements InvertibleBoundable
Modifier and Type | Field and Description |
---|---|
protected double |
i00 |
protected double |
i01 |
protected double |
i02 |
protected double |
i03 |
protected double |
i10 |
protected double |
i11 |
protected double |
i12 |
protected double |
i13 |
protected double |
i20 |
protected double |
i21 |
protected double |
i22 |
protected double |
i23 |
protected boolean |
isInvertible |
protected double |
m00 |
protected double |
m01 |
protected double |
m02 |
protected double |
m03 |
protected double |
m10 |
protected double |
m11 |
protected double |
m12 |
protected double |
m13 |
protected double |
m20 |
protected double |
m21 |
protected double |
m22 |
protected double |
m23 |
protected static int |
MIN_NUM_MATCHES |
cost, rnd
Constructor and Description |
---|
RigidModel3D() |
Modifier and Type | Method and Description |
---|---|
double[] |
apply(double[] l)
Apply the
CoordinateTransform to a location. |
void |
applyInPlace(double[] l)
Apply the
CoordinateTransform to a location. |
double[] |
applyInverse(double[] l)
Apply the inverse of the model to a point location
|
void |
applyInverseInPlace(double[] l)
apply the inverse of the model to a point location
|
void |
concatenate(RigidModel3D model) |
void |
concatenate(TranslationModel3D model) |
RigidModel3D |
copy()
Clone the model.
|
RigidModel3D |
createInverse()
TODO Not yet tested
|
<P extends PointMatch> |
fit(Collection<P> matches)
Fit the
Model to a set of data points minimizing the global
transfer error. |
double[] |
getMatrix(double[] m) |
int |
getMinNumMatches() |
protected void |
invert() |
void |
preConcatenate(RigidModel3D model) |
void |
preConcatenate(TranslationModel3D model) |
void |
reset() |
void |
rotate(int axis,
double d)
Rotate
|
void |
set(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23)
Deprecated.
|
void |
set(RigidModel3D m)
Set the model to m
|
void |
set(TranslationModel3D m) |
void |
toArray(double[] data)
Write the 12 parameters of the affine into a double array.
|
void |
toMatrix(double[][] data)
Write the 12 parameters of the affine into a 4x3 double array.
|
String |
toString() |
estimateBounds, estimateInverseBounds
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, fit, fit, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
estimateBounds
estimateInverseBounds
protected static final int MIN_NUM_MATCHES
protected double m00
protected double m01
protected double m02
protected double m03
protected double m10
protected double m11
protected double m12
protected double m13
protected double m20
protected double m21
protected double m22
protected double m23
protected double i00
protected double i01
protected double i02
protected double i03
protected double i10
protected double i11
protected double i12
protected double i13
protected double i20
protected double i21
protected double i22
protected double i23
protected boolean isInvertible
public double[] getMatrix(double[] m)
getMatrix
in class AbstractAffineModel3D<RigidModel3D>
public final int getMinNumMatches()
getMinNumMatches
in interface Model<RigidModel3D>
PointMatches
required
to solve the model.public final double[] apply(double[] l)
CoordinateTransform
CoordinateTransform
to a location.apply
in interface CoordinateTransform
public final void applyInPlace(double[] l)
CoordinateTransform
CoordinateTransform
to a location.applyInPlace
in interface CoordinateTransform
public final double[] applyInverse(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
applyInverse
in interface InverseCoordinateTransform
NoninvertibleModelException
public final void applyInverseInPlace(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
applyInverseInPlace
in interface InverseCoordinateTransform
NoninvertibleModelException
public final <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Model
Model
to a set of data points minimizing the global
transfer error. This is assumed to be implemented as a weighted least
squares minimization. Use ransac
and/ or Model.filter(java.util.Collection<P>, java.util.Collection<P>, double, int)
to remove outliers from your data points.
The estimated model transfers match.p1.local to match.p2.world.
fit
in interface Model<RigidModel3D>
matches
- set of point correpondencesNotEnoughDataPointsException
- if matches does not contain
enough data pointsIllDefinedDataPointsException
- if the set of data points is
inappropriate to solve the Modelpublic final void set(RigidModel3D m)
Model
set
in interface Model<RigidModel3D>
public final void reset()
public final void set(TranslationModel3D m)
public RigidModel3D copy()
Model
copy
in interface Model<RigidModel3D>
protected void invert()
public final void preConcatenate(RigidModel3D model)
preConcatenate
in interface Affine3D<RigidModel3D>
public final void concatenate(RigidModel3D model)
concatenate
in interface Affine3D<RigidModel3D>
public final void concatenate(TranslationModel3D model)
public final void preConcatenate(TranslationModel3D model)
@Deprecated public final void set(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23)
m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 0 0 0 1
m00
- m01
- m02
- m03
- m10
- m11
- m12
- m13
- m20
- m21
- m22
- m23
- public RigidModel3D createInverse()
createInverse
in interface Affine3D<RigidModel3D>
createInverse
in interface InvertibleCoordinateTransform
public void rotate(int axis, double d)
axis
- 0=x, 1=y, 2=zd
- angle in radians
TODO Don't be lazy and do it directly on the values instead of creating another transformpublic void toArray(double[] data)
Affine3D
toArray
in interface Affine3D<RigidModel3D>
public void toMatrix(double[][] data)
Affine3D
[0][0] -> m00; [0][1] -> m01; [0][2] -> m02; [0][3] -> m03
[1][0] -> m10; [1][1] -> m11; [1][2] -> m12; [1][3] -> m13
[2][0] -> m20; [2][1] -> m21; [2][2] -> m22; [2][3] -> m23
toMatrix
in interface Affine3D<RigidModel3D>
Copyright © 2015–2021 Fiji. All rights reserved.