Class SubsetMatcher
java.lang.Object
net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.SubsetMatcher
- All Implemented Interfaces:
Matcher
- Direct Known Subclasses:
ModelPriorSubsetMatcher
-
Constructor Summary
ConstructorsConstructorDescriptionSubsetMatcher(int subsetSize, int numNeighbors) Matches n out of m neighbor points, the effort increases exponentially(!) -
Method Summary
Modifier and TypeMethodDescriptionstatic int[][]computePD(int n, int k, int offset) protected static int[][]computePDRecursive(int tolerance, int n, int offset) Computes recursively how to create different PointDescriptors of the same Point when some tolerance is allowed, e.g. there are outliers which should be identified.createCandidates(AbstractPointDescriptor<?, ?> pd1, AbstractPointDescriptor<?, ?> pd2) int[][]doublegetNormalizationFactor(ArrayList<mpicbg.models.PointMatch> matches, Object fitResult) Computes a normalization factor for the case that the different set ofPointMatches are not comparable (for example number of neighbors used is not constant)intintintintint
-
Constructor Details
-
SubsetMatcher
public SubsetMatcher(int subsetSize, int numNeighbors) Matches n out of m neighbor points, the effort increases exponentially(!) For exampleSubsetMatcher(4,4) is identical to callingSimpleMatcher(4)- Parameters:
subsetSize- (n) - how many neighbors are matched in each trynumNeighbors- (m) - out of how many neighbors to choose
-
-
Method Details
-
getNeighbors
public int[][] getNeighbors() -
getSubsetSize
public int getSubsetSize() -
getNumNeighbors
public int getNumNeighbors() -
getNumCombinations
public int getNumCombinations() -
getNumMatchings
public int getNumMatchings() -
getRequiredNumNeighbors
public int getRequiredNumNeighbors()- Specified by:
getRequiredNumNeighborsin interfaceMatcher- Returns:
- The number of nearest neighbors required for this
Matcher
-
createCandidates
public ArrayList<ArrayList<mpicbg.models.PointMatch>> createCandidates(AbstractPointDescriptor<?, ?> pd1, AbstractPointDescriptor<?, ?> pd2) - Specified by:
createCandidatesin interfaceMatcher- Parameters:
pd1- - pointdescriptor 1pd2- - pointdescriptor 2- Returns:
- An
ArrayListof corresponding set ofPointMatches which containLinkedPoints linking to the actualPointinstance they are created from
-
getNormalizationFactor
Description copied from interface:MatcherComputes a normalization factor for the case that the different set ofPointMatches are not comparable (for example number of neighbors used is not constant)- Specified by:
getNormalizationFactorin interfaceMatcher- Parameters:
matches- the set ofPointMatchesfitResult- - potential data needed to compute it- Returns:
- The normalization factor for a certain set of
PointMatches
-
computePD
public static int[][] computePD(int n, int k, int offset) -
computePDRecursive
protected static int[][] computePDRecursive(int tolerance, int n, int offset) Computes recursively how to create different PointDescriptors of the same Point when some tolerance is allowed, e.g. there are outliers which should be identified. For 3 neighbors allowing 2 outliers and starting with the second nearest neigbor (the nearest one is in most cases the one you use as input) the result looks like that: (Each coloum will be one PointDescriptor) |1| |1| |1| |2| |1| |1| |2| |1| |2| |3| |2| |2| |3| |3| |2| |3| |3| |4| |4| |4| |3| |4| |4| |4| |5| |5| |5| |5| |5| |5|- Parameters:
tolerance- - How many tolerance is accepted [0 ... m]n- - initialized with the number of neighborsoffset- - the starting position for the neighbors, usually 1- Returns:
- an array containing the neighbors for each PointDescriptor as array
-