public class SimilarityModel3D extends AbstractAffineModel3D<SimilarityModel3D> 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 |
protected double[][] |
N |
cost, rnd| Constructor and Description |
|---|
SimilarityModel3D() |
| 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
|
boolean |
canDoNumDimension(int numDimensions) |
void |
concatenate(SimilarityModel3D model) |
SimilarityModel3D |
copy()
Clone the model.
|
SimilarityModel3D |
createInverse() |
<P extends PointMatch> |
fit(Collection<P> matches)
Fit the
Model to a set of data points minimizing the global
transfer error. |
void |
fit(double[][] p,
double[][] q,
double[] w)
Default fit implementation using
Model.fit(Collection). |
void |
fit(float[][] p,
float[][] q,
float[] w)
Default fit implementation using
Model.fit(Collection). |
double[] |
getMatrix(double[] m) |
int |
getMinNumMatches() |
protected void |
invert() |
void |
preConcatenate(SimilarityModel3D model) |
void |
reset() |
void |
set(RigidModel3D m) |
void |
set(SimilarityModel3D 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, estimateInverseBoundsbetterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitestimateBoundsestimateInverseBoundsprotected 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 final double[][] N
protected boolean isInvertible
public boolean canDoNumDimension(int numDimensions)
public final void fit(float[][] p,
float[][] q,
float[] w)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException
AbstractModelModel.fit(Collection). This foils
the intention that AbstractModel.fit(float[][], float[][], float[]) would be
potentially more efficient. You should better implement it directly.fit in interface Model<SimilarityModel3D>fit in class AbstractModel<SimilarityModel3D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availableIllDefinedDataPointsException - if the set of data points is
inappropriate to solve the Modelpublic final void fit(double[][] p,
double[][] q,
double[] w)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException
AbstractModelModel.fit(Collection). This foils
the intention that AbstractModel.fit(double[][], double[][], double[]) would be
potentially more efficient. You should better implement it directly.fit in interface Model<SimilarityModel3D>fit in class AbstractModel<SimilarityModel3D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availableIllDefinedDataPointsException - if the set of data points is
inappropriate to solve the Modelpublic final <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException, IllDefinedDataPointsException
ModelModel 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<SimilarityModel3D>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(SimilarityModel3D m)
Modelset in interface Model<SimilarityModel3D>public final void reset()
public final void set(TranslationModel3D m)
public final void set(RigidModel3D m)
public SimilarityModel3D copy()
Modelcopy in interface Model<SimilarityModel3D>public final int getMinNumMatches()
getMinNumMatches in interface Model<SimilarityModel3D>PointMatches required
to solve the model.public final double[] apply(double[] l)
CoordinateTransformCoordinateTransform to a location.apply in interface CoordinateTransformpublic final void applyInPlace(double[] l)
CoordinateTransformCoordinateTransform to a location.applyInPlace in interface CoordinateTransformprotected void invert()
public double[] applyInverse(double[] l)
throws NoninvertibleModelException
InverseCoordinateTransformapplyInverse in interface InverseCoordinateTransformNoninvertibleModelExceptionpublic void applyInverseInPlace(double[] l)
throws NoninvertibleModelException
InverseCoordinateTransformapplyInverseInPlace in interface InverseCoordinateTransformNoninvertibleModelExceptionpublic void preConcatenate(SimilarityModel3D model)
preConcatenate in interface Affine3D<SimilarityModel3D>public void concatenate(SimilarityModel3D model)
concatenate in interface Affine3D<SimilarityModel3D>public void toArray(double[] data)
Affine3DtoArray in interface Affine3D<SimilarityModel3D>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<SimilarityModel3D>public SimilarityModel3D createInverse()
createInverse in interface Affine3D<SimilarityModel3D>createInverse in interface InvertibleCoordinateTransformpublic double[] getMatrix(double[] m)
getMatrix in class AbstractAffineModel3D<SimilarityModel3D>Copyright © 2015–2021 Fiji. All rights reserved.