@Reference(type=Book, author={"Hartley, R.~I.","Zisserman, A."}, title="Multiple View Geometry in Computer Vision", year="2004", edition="Second", publisher="Cambridge University Press, ISBN: 0521540518") public enum HomographyRefinement extends Enum<HomographyRefinement>
Enum Constant and Description |
---|
NONE
Don't perform any refinement and just return the initial input matrix
|
SINGLE_IMAGE_TRANSFER
The points in the first image are projected by the homography matrix to
produce new estimates of the second image points from which the residuals
are computed and minimised by the optimiser.
|
SINGLE_IMAGE_TRANSFER_INVERSE
The points in the second image are projected by the inverse homography
matrix to produce new estimates of the first image points from which the
residuals are computed and minimised by the optimiser.
|
SYMMETRIC_TRANSFER
The points in the first image are projected by the homography matrix to
produce new estimates of the second image points and the second image
point projected by the inverse homography to produce estimates of the
first.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
computeError(Jama.Matrix h,
List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
Compute the error value being optimised between the two point sets.
|
protected abstract org.apache.commons.math3.analysis.MultivariateMatrixFunction |
getJacobianFunction(List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data) |
protected abstract org.apache.commons.math3.analysis.MultivariateVectorFunction |
getValueFunction(List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data) |
abstract Jama.Matrix |
refine(Jama.Matrix initial,
List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
Refine an initial guess at the homography that takes the first points in
data to the second using non-linear Levenberg Marquardt optimisation.
|
static HomographyRefinement |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HomographyRefinement[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HomographyRefinement NONE
public static final HomographyRefinement SINGLE_IMAGE_TRANSFER
Value and analytic Jacobian implementations auto-generated from Matlab using the following:
syms h0 h1 h2 h3 h4 h5 h6 h7 h8 real
syms X1 Y1 real
Mi = [X1 Y1 1]';
H1 = [h0 h1 h2];
H2 = [h3 h4 h5];
H3 = [h6 h7 h8];
mihat = (1 / (H3*Mi)) * [H1*Mi; H2*Mi];
J = jacobian(mihat, [h0,h1,h2,h3,h4,h5,h6,h7,h8]);
ccode(mihat, 'file', 'singleImageTransfer_value.c')
ccode(J, 'file', 'singleImageTransfer_jacobian.c')
public static final HomographyRefinement SINGLE_IMAGE_TRANSFER_INVERSE
public static final HomographyRefinement SYMMETRIC_TRANSFER
Value and analytic Jacobian implementations auto-generated from Matlab using the following:
syms h0 h1 h2 h3 h4 h5 h6 h7 h8 real
syms X1 Y1 X2 Y2 real
M1 = [X1 Y1 1]';
M2 = [X2 Y2 1]';
H = [h0 h1 h2; h3 h4 h5; h6 h7 h8];
Hi = inv(H);
H1 = H(1,:);
H2 = H(2,:);
H3 = H(3,:);
H1i = Hi(1,:);
H2i = Hi(2,:);
H3i = Hi(3,:);
mihat = [(1 / (H3i*M2)) * [H1i*M2; H2i*M2]; (1 / (H3*M1)) * [H1*M1; H2*M1]];
J = jacobian(mihat, [h0,h1,h2,h3,h4,h5,h6,h7,h8]);
ccode(mihat, 'file', 'symImageTransfer_value.c')
ccode(J, 'file', 'symImageTransfer_jacobian.c')
public static HomographyRefinement[] values()
for (HomographyRefinement c : HomographyRefinement.values()) System.out.println(c);
public static HomographyRefinement valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullprotected abstract org.apache.commons.math3.analysis.MultivariateVectorFunction getValueFunction(List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
protected abstract org.apache.commons.math3.analysis.MultivariateMatrixFunction getJacobianFunction(List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
public abstract double computeError(Jama.Matrix h, List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
HomographyRefinement
method in use.h
- the homographydata
- the data point-pairspublic abstract Jama.Matrix refine(Jama.Matrix initial, List<? extends IndependentPair<? extends Point2d,? extends Point2d>> data)
TransformUtilities.homographyMatrixNorm(List)
).initial
- the initial estimate (probably from the DLT technique)data
- the pairs of data points