Package stitching.model
Class PointMatch
java.lang.Object
stitching.model.PointMatch
A link between two
Points that are expected to be ideally at
the same location in the world coordinate space.
The link is directed, such that each link touches only p1.
- Author:
- Stephan Saalfeld
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected floatprotected float[] -
Constructor Summary
ConstructorsConstructorDescriptionPointMatch(Point p1, Point p2) Constructor Create aPointMatchwithout weight.PointMatch(Point p1, Point p2, float weight) Constructor Create aPointMatchwith one weight.PointMatch(Point p1, Point p2, float[] weights) Constructor Create aPointMatchwith an Array of weights.PointMatch(Point p1, Point p2, float[] weights, float strength) Constructor Create aPointMatchwith an Array of weights and a strength.PointMatch(Point p1, Point p2, float weight, float strength) Constructor Create aPointMatchwith one weight and strength.PointMatch(Point p1, Point p2, float weight, OverlapProperties o) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidApply aModeltop1, update distance.final voidapplyByStrength(Model model, float amount) Apply aModeltop1with a given amount, update distance.protected final voidstatic final ArrayList<PointMatch> flip(Collection<PointMatch> matches) Flip symmetrically, weights remains unchanged.final floatfinal PointgetP1()final PointgetP2()final floatfinal float[]final voidsetWeight(int index, float weight) final voidsetWeights(float[] weights)
-
Field Details
-
o
-
weights
protected float[] weights -
weight
protected float weight -
strength
protected float strength
-
-
Constructor Details
-
PointMatch
Constructor Create aPointMatchwith an Array of weights and a strength. The Array of weights will be copied. Strength gives the amount of application: strength = 0 meansp1will not be transferred, strength = 1 meansp1will be fully transferred- Parameters:
p1- Point 1p2- Point 2weights- Array of weightsstrength- how much shouldapplyByStrength(Model, float)affectp1
-
PointMatch
Constructor Create aPointMatchwith an Array of weights. The Array of weights will be copied.- Parameters:
p1- Point 1p2- Point 2weights- Array of weights
-
PointMatch
Constructor Create aPointMatchwith one weight.- Parameters:
p1- Point 1p2- Point 2weight- Weight
-
PointMatch
-
PointMatch
Constructor Create aPointMatchwith one weight and strength. Strength gives the amount of application: strength = 0 meansp1will not be transferred, strength = 1 meansp1will be fully transferred- Parameters:
p1- Point 1p2- Point 2weight- Weightstrength- how much shouldapplyByStrength(Model, float)affectp1
-
PointMatch
Constructor Create aPointMatchwithout weight.- Parameters:
p1- Point 1p2- Point 2
-
-
Method Details
-
getP1
-
getP2
-
getWeights
public final float[] getWeights() -
setWeights
public final void setWeights(float[] weights) -
getWeight
public final float getWeight() -
setWeight
public final void setWeight(int index, float weight) -
calculateWeight
protected final void calculateWeight() -
getDistance
public final float getDistance() -
apply
Apply aModeltop1, update distance.- Parameters:
model-
-
applyByStrength
Apply aModeltop1with a given amount, update distance.- Parameters:
model-amount-
-
flip
Flip symmetrically, weights remains unchanged.- Parameters:
matches-- Returns:
-