public class CubicBSplineTransform extends AbstractModel<CubicBSplineTransform> implements CoordinateTransform
cost, rnd
Constructor and Description |
---|
CubicBSplineTransform()
Empty constructor
|
CubicBSplineTransform(int intervals,
BSplineModel swx,
BSplineModel swy,
int width,
int height)
Cubic B-spline transform constructor
|
CubicBSplineTransform(int intervals,
double[][] cx,
double[][] cy,
int width,
int height)
Cubic B-spline transform constructor
|
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. |
CubicBSplineTransform |
copy()
Clone method
|
<P extends PointMatch> |
fit(Collection<P> matches)
Fit the
Model to a set of data points minimizing the global
transfer error. |
int |
getMinNumMatches() |
void |
init(String dataString)
Initialize cubic B-spline transform from the parameters of a string
|
void |
scale(double xScale,
double yScale) |
void |
set(CubicBSplineTransform m)
Set the model to m
|
void |
set(int intervals,
BSplineModel swx,
BSplineModel swy,
int width,
int height)
Set cubic B-spline transform values
|
void |
set(int intervals,
double[][] cx,
double[][] cy,
int width,
int height)
Set cubic B-spline transform constructor
|
void |
set(Param p,
int sourceWidth,
int sourceHeight,
int targetWidth,
int targetHeight) |
String |
toDataString()
Save cubic B-spline transform information into String
|
String |
toString() |
String |
toXML(String indent)
Create an XML-export of the
CoordinateTransform
for use in TrakEM2. |
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, fit, fit, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test
public CubicBSplineTransform()
public CubicBSplineTransform(int intervals, double[][] cx, double[][] cy, int width, int height)
intervals
- intervals between B-spline coefficientscx
- B-spline coefficients for transformation in the x axiscy
- B-spline coefficients for transformation in the y axiswidth
- width of the target imageheight
- height of the target imagepublic CubicBSplineTransform(int intervals, BSplineModel swx, BSplineModel swy, int width, int height)
intervals
- intervals between B-spline coefficientsswx
- B-spline model for transformation in the x axisswy
- B-spline model for transformation in the y axiswidth
- width of the target imageheight
- height of the target imagepublic void set(int intervals, BSplineModel swx, BSplineModel swy, int width, int height)
intervals
- intervals between B-spline coefficientsswx
- B-spline model for transformation in the x axisswy
- B-spline model for transformation in the y axiswidth
- width of the target imageheight
- height of the target imagepublic void set(int intervals, double[][] cx, double[][] cy, int width, int height)
intervals
- intervals between B-spline coefficientscx
- B-spline coefficients for transformation in the x axiscy
- B-spline coefficients for transformation in the y axiswidth
- width of the target imageheight
- height of the target imagepublic double[] apply(double[] l)
CoordinateTransform
CoordinateTransform
to a location.apply
in interface CoordinateTransform
public void applyInPlace(double[] l)
CoordinateTransform
CoordinateTransform
to a location.applyInPlace
in interface CoordinateTransform
public void init(String dataString) throws NumberFormatException
dataString
- basic cubic B-spline transform parametersNumberFormatException
public String toDataString()
public final String toXML(String indent)
CoordinateTransform
CoordinateTransform
for use in TrakEM2.public final CubicBSplineTransform copy()
copy
in interface Model<CubicBSplineTransform>
public <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<CubicBSplineTransform>
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 void scale(double xScale, double yScale)
public void set(Param p, int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
public int getMinNumMatches()
getMinNumMatches
in interface Model<CubicBSplineTransform>
PointMatches
required
to solve the model.public void set(CubicBSplineTransform m)
Model
set
in interface Model<CubicBSplineTransform>
Copyright © 2015–2021 Fiji. All rights reserved.