Constructor and Description |
---|
ICP(List<P> target,
List<P> reference)
Also instantiates a new
ICP instance, but uses the SimplePointMatchIdentification to define corresponding points. |
ICP(List<P> target,
List<P> reference,
double distanceThreshold)
Also instantiates a new
ICP instance, but uses the SimplePointMatchIdentification to define corresponding points. |
ICP(List<P> target,
List<P> reference,
PointMatchIdentification<P> pointMatchIdentifier)
Instantiates a new
ICP object with the List of target and reference points as well as the PointMatchIdentification interface that defines
how corresponding points are identified. |
Modifier and Type | Method and Description |
---|---|
void |
estimateIntialModel(List<PointMatch> matches,
Model<?> model)
Estimates an initial
Model based on some given PointMatch es. |
ArrayList<PointMatch> |
getAmbigousMatches()
Returns the
ArrayList of ambigous PointMatch es indentified in the last ICP iteration, or null if no iteration has been computed yet. |
double |
getAverageError()
Returns the average error of the last ICP iteration, or -1 if no iteration has been computed yet.
|
double |
getMaximalError()
Returns the maximum error of a
PointMatch of the last ICP iteration, or -1 if no iteration has been computed yet. |
int |
getNumAmbigousMatches()
Returns the number of ambigous
PointMatch es indentified in the last ICP iteration, or -1 if no iteration has been computed yet. |
int |
getNumPointMatches()
Returns the number of
PointMatch es of the last ICP iteration, or -1 if no iteration has been computed yet. |
protected static ArrayList<Integer> |
getOccurences(Point pointTarget,
Point pointReference,
List<PointMatch> list)
|
List<PointMatch> |
getPointMatches()
|
PointMatchIdentification<P> |
getPointMatchIdentification()
Returns the current
PointMatchIdentification that is used to identfy corresponding points |
List<P> |
getReferencePoints() |
List<P> |
getTargetPoints() |
static ArrayList<PointMatch> |
removeAmbigousMatches(List<PointMatch> matches)
Detects ambigous (and duplicate)
PointMatch es, i.e. |
void |
runICPIteration(Model<?> lastModel,
Model<?> newModel)
Performs one iteration of the
ICP . |
void |
setPointMatchIdentification(PointMatchIdentification<P> pointMatchIdentifier)
Sets the
PointMatchIdentification that defines how PointMatch es between reference and target are identified. |
public ICP(List<P> target, List<P> reference, PointMatchIdentification<P> pointMatchIdentifier)
ICP
object with the List
of target and reference points as well as the PointMatchIdentification
interface that defines
how corresponding points are identified. List
s have to implement Point
(for compatibility with Model
) and Leaf
(for compatibility with KDTree
).target
- - the List
of target pointsreference
- - the List
of reference pointspointMatchIdentifier
- - the PointMatchIdentification
which defines how correspondences are establishedpublic ICP(List<P> target, List<P> reference, double distanceThreshold)
ICP
instance, but uses the SimplePointMatchIdentification
to define corresponding points.target
- - the List
of target pointsreference
- - the List
of reference pointsdistanceThreshold
- - the maximal distance of SimplePointMatchIdentification
, so that the nearest neighbor of a point is still counted as a corresponding pointpublic void runICPIteration(Model<?> lastModel, Model<?> newModel) throws NotEnoughDataPointsException, IllDefinedDataPointsException, NoSuitablePointsException
ICP
. It takes the last Model
as input to find the corresponding points for the new Model
.
The result is the new Model, the number of corresponding points, the average, and the maximal error. Note that lastModel and newModel can be the
same instance and it will be overwritten.lastModel
- - The last Model
that maps the target.local coordinates to the reference.world coordinates, used to find the corresponding pointsnewModel
- - The Model
that maps the target.local coordinates to the reference.world coordinates, will be fitted to the new pointsNotEnoughDataPointsException
IllDefinedDataPointsException
NoSuitablePointsException
public void estimateIntialModel(List<PointMatch> matches, Model<?> model) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Model
based on some given PointMatch
es. Note that the PointMatch
es have to be stored as PointMatch(target,reference).matches
- - The List
of apriori known PointMatch
esmodel
- - The Model
to useNotEnoughDataPointsException
IllDefinedDataPointsException
public void setPointMatchIdentification(PointMatchIdentification<P> pointMatchIdentifier)
PointMatchIdentification
that defines how PointMatch
es between reference and target are identified.
The simplest way to do it is the SimplePointMatchIdentification
class which takes the nearest neighbor with a minimal distance threshold.pointMatchIdentifier
- - the new PointMatchIdentification
public PointMatchIdentification<P> getPointMatchIdentification()
PointMatchIdentification
that is used to identfy corresponding pointspublic List<PointMatch> getPointMatches()
List
of PointMatch
espublic double getAverageError()
public double getMaximalError()
PointMatch
of the last ICP iteration, or -1 if no iteration has been computed yet.public int getNumPointMatches()
PointMatch
es of the last ICP iteration, or -1 if no iteration has been computed yet.PointMatch
espublic int getNumAmbigousMatches()
PointMatch
es indentified in the last ICP iteration, or -1 if no iteration has been computed yet.PointMatch
espublic ArrayList<PointMatch> getAmbigousMatches()
ArrayList
of ambigous PointMatch
es indentified in the last ICP iteration, or null if no iteration has been computed yet.ArrayList
of PointMatch
espublic static ArrayList<PointMatch> removeAmbigousMatches(List<PointMatch> matches)
PointMatch
es, i.e. if a Point
corresponds with more than one other Point
matches
- - the List
of PointMatch
esArrayList
containing the removed ambigous or duplicate PointMatch
esprotected static ArrayList<Integer> getOccurences(Point pointTarget, Point pointReference, List<PointMatch> list)
pointTarget
- - one Point
pointReference
- - the other Point
list
- - the List
of PointMatch
es (target, reference)ArrayList
of indices which should be removed due to duplicate or ambigous occurenceCopyright © 2015–2021 Fiji. All rights reserved.